[Personal-WP] Add GitHub OAuth integration for private repositories#3180
Open
[Personal-WP] Add GitHub OAuth integration for private repositories#3180
Conversation
f0084e0 to
b9d661f
Compare
b9d661f to
a9ae2b1
Compare
3318673 to
c9943c8
Compare
a9ae2b1 to
c5ada0d
Compare
c5ada0d to
a856cfa
Compare
7c6e8a0 to
5e694fc
Compare
1e68842 to
c4f4aa2
Compare
5e694fc to
8a9b151
Compare
c4f4aa2 to
83320f7
Compare
8a9b151 to
36800a5
Compare
83320f7 to
70fb69c
Compare
36800a5 to
b17472b
Compare
70fb69c to
0a87ca1
Compare
b17472b to
81095b9
Compare
Adds GitHub OAuth support to personal-wp, allowing blueprints to access private GitHub repositories. - Added oauth.php for token exchange with GitHub - Added GitHubPrivateRepoAuthModal for authentication prompts - createGitAuthHeaders() provides auth headers, capturing token at call time (not creation time) to work after OAuth redirect - Hash fragment blueprints converted to blueprint-url query params early in main.tsx to survive OAuth redirect - buildOAuthRedirectUrl() handles this conversion for the auth modal - GitAuthenticationError detection in boot error handler - Early return in catch block prevents URL clearing after errors
0a87ca1 to
0c61bdd
Compare
adamziel
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for the change, related issues
This PR adds GitHub OAuth support to personal-wp, allowing blueprints to access private GitHub repositories. This mirrors the existing OAuth support in the main website.
Todo after merging
Create a new Github app and configure the
CLIENT_IDandCLIENT_SECRETfor this deployment.Contains fixes from #3181
Implementation details
OAuth Flow
oauth.phpfor token exchange with GitHubGitHubPrivateRepoAuthModalcomponent to prompt for authentication when a blueprint requires private repo accesscreateGitAuthHeaders()provides authentication headers for GitHub API requestsBlueprint Preservation
blueprint-urlquery parameters early inmain.tsxto survive the OAuth redirect flowbuildOAuthRedirectUrl()also handles this conversion when building the redirect URLMulti-tab Handling
sessionStorage(not just memory) to survive the takeover reload. sessionStorage is cleared when the tab closes, maintaining security.Error Handling
GitAuthenticationErrorin the boot error handlerblueprint-urlbefore OAuth redirect could preserve it)Testing Instructions (or ideally a Blueprint)
oauth.phpconfigured for your GitHub OAuth appMulti-tab test: