Repository navigation
fix(sources): reuse Google sign-in redirect URI when sharing AUTH_GOOGLE_ID - #13
Merged
Merged
Conversation
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.
Summary
/api/auth/callback/googlewhen falling back toAUTH_GOOGLE_ID: WhenGOOGLE_SOURCES_CLIENT_IDis unset (or matchesAUTH_GOOGLE_ID),redirectUri()insrc/server/sources/google-oauth.tsnow uses${WAYFARE_BASE_URL}/api/auth/callback/googleinstead of requiring a second/api/sources/callbackredirect URI on the same Google OAuth client./api/auth/callback/google:GETinsrc/app/api/auth/[...all]/route.tsinspects thestatequery parameter viareadState()and delegates valid HMAC-signed"oauth-state"callbacks directly to the photo-sources callback handler, while normal Better Auth sign-in callbacks pass through unchanged. DedicatedGOOGLE_SOURCES_CLIENT_IDclients continue to use/api/sources/callback.scripts/firebase-bootstrap.sh& operator docs (de/en): Clarify in step 8 thatAUTH_GOOGLE_IDand its redirect URI are reused automatically when Google Sign-In is enabled, note thatpicker.googleapis.com(Google Picker API) must be included when restrictingGOOGLE_API_KEY, and updatedocs/{de,en}/operator/{photo-sources,firebase}.md.