fix(auth): Register auth router and fix GitHub OAuth flow (#821)#1012
Open
yw13931835525-cyber wants to merge 1 commit intoSolFoundry:mainfrom
Open
fix(auth): Register auth router and fix GitHub OAuth flow (#821)#1012yw13931835525-cyber wants to merge 1 commit intoSolFoundry:mainfrom
yw13931835525-cyber wants to merge 1 commit intoSolFoundry:mainfrom
Conversation
Fixes for Bounty SolFoundry#821 - GitHub OAuth Sign-In Flow: 1. main.py: Add missing auth_router registration - Auth endpoints were returning 404 because router wasn't registered 2. models/user.py: Add missing Pydantic request/response models - GitHubOAuthRequest, GitHubOAuthResponse - WalletAuthRequest, WalletAuthResponse - LinkWalletRequest, LinkWalletResponse - RefreshTokenRequest, RefreshTokenResponse - AuthMessageResponse 3. api/auth.py: Fix callback endpoint - Change from POST /github to GET /github/callback - GitHub OAuth redirects with GET, not POST - Accept code and state as query parameters 4. services/auth_service.py: Fix URL encoding - Use urlencode() for query parameters - Ensures redirect_uri and other params are properly encoded Fixes T1 bounty - unlocks T2/T3 eligibility (200K FNDRY)
4 tasks
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.
Fixes Bounty #821 - GitHub OAuth Sign-In Flow
Issues Fixed:
Auth router not registered (main.py) - All auth endpoints were returning 404 because the auth router was never included in the app.
Missing Pydantic models (models/user.py) - Added missing request/response models:
GitHubOAuthRequest,GitHubOAuthResponseWalletAuthRequest,WalletAuthResponseLinkWalletRequest,LinkWalletResponseRefreshTokenRequest,RefreshTokenResponseAuthMessageResponseWrong callback endpoint method (api/auth.py) - Changed from
POST /githubtoGET /github/callback. GitHub OAuth redirects users back with a GET request, not POST.URL encoding issue (services/auth_service.py) - Used
urlencode()for query parameters to properly encode special characters in redirect_uri and other params.Verification:
Reward: