Skip to content

fix(sources): reuse Google sign-in redirect URI when sharing AUTH_GOOGLE_ID - #13

Merged
t11z merged 1 commit into
mainfrom
fix/google-sources-shared-redirect-uri
Nov 1, 2026
Merged

t11z merged 1 commit into
mainfrom
fix/google-sources-shared-redirect-uri

Conversation

@t11z

@t11z t11z commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reuse /api/auth/callback/google when falling back to AUTH_GOOGLE_ID: When GOOGLE_SOURCES_CLIENT_ID is unset (or matches AUTH_GOOGLE_ID), redirectUri() in src/server/sources/google-oauth.ts now uses ${WAYFARE_BASE_URL}/api/auth/callback/google instead of requiring a second /api/sources/callback redirect URI on the same Google OAuth client.
  • Route photo-source callbacks on /api/auth/callback/google: GET in src/app/api/auth/[...all]/route.ts inspects the state query parameter via readState() 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. Dedicated GOOGLE_SOURCES_CLIENT_ID clients continue to use /api/sources/callback.
  • Improve scripts/firebase-bootstrap.sh & operator docs (de/en): Clarify in step 8 that AUTH_GOOGLE_ID and its redirect URI are reused automatically when Google Sign-In is enabled, note that picker.googleapis.com (Google Picker API) must be included when restricting GOOGLE_API_KEY, and update docs/{de,en}/operator/{photo-sources,firebase}.md.

@t11z t11z self-assigned this Nov 1, 2026
@t11z t11z added the bug Something isn't working label Nov 1, 2026
@t11z
t11z merged commit 2da644a into main Nov 1, 2026
2 checks passed
@t11z
t11z deleted the fix/google-sources-shared-redirect-uri branch November 1, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant