Skip to content

fix: Google sign-in from the Android app was refused - #44

Merged
KMKoushik merged 1 commit into
mainfrom
fix/android-google-signin
Nov 3, 2026
Merged

KMKoushik merged 1 commit into
mainfrom
fix/android-google-signin

Conversation

@KMKoushik

Copy link
Copy Markdown
Contributor

On Android, tapping Continue with Google showed "To sign in to the SplitPro app, open the app and start signing in there." The /start logout-CSRF guard only allowed Sec-Fetch-Site: none/same-origin, but Chrome Custom Tabs opened by an app send android-app://<package> as the Referer and don't count as a direct navigation.

  • Accept Referer: android-app://app.splitpro (web pages can't set an android-app:// Referer; only app-launched browser navigations carry it). Other packages are still refused.
  • Log Sec-Fetch-Site, Referer and User-Agent when /start refuses, to confirm on the next attempt.
  • Unit tests for our package, trailing slash, other packages and look-alikes.

iOS (ASWebAuthenticationSession) already worked.

Chrome Custom Tabs opened by the app mark the navigation as cross-site and
send the app (android-app://app.splitpro) as the Referer, so /start showed
the 'start signing in from the app' page. Accept our app's Referer, and log
the headers of any refused start so the next mismatch is visible.
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@KMKoushik
KMKoushik merged commit ac64bc0 into main Nov 3, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant