Add Android deep-link OAuth bridge for WebView auth
Problem: Android WebView opens OAuth in external browser (Chrome).
After successful login, cookie stays in Chrome and WebView remains
unauthenticated because cookies are not shared between apps.

Solution: bridge page flow that avoids cookies entirely for mobile.

Backend:
- /auth/login accepts ?platform=android and ?return_to params
- /auth/callback detects android via state metadata, skips cookie,
  redirects to /auth/mobile-done?sid=<session_id>
- /auth/mobile-done renders HTML that deep-links to navi://auth/callback

Webclient:
- login() detects NaviAndroid UA and adds ?platform=android

Android:
- MainActivity: handle incoming navi:// intent in onCreate and onNewIntent,
  set cookie via CookieManager, reload WebView
- AndroidManifest: add intent-filter for navi://auth/callback and
  singleTask launchMode

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 596cd4e commit a27ce323b2c4fd8e184931d5f4ac7464fddc8cd2
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 9 May
Showing 7 changed files
View
android-client/app/src/main/AndroidManifest.xml
View
android-client/app/src/main/java/com/navi/client/MainActivity.kt
View
navi/api/routes/auth.py
View
webclient/dist/assets/index-Bzu2xBc7.js 0 → 100644
Not supported
View
webclient/dist/assets/index-DUUJTs7F.js 100644 → 0
Not supported
View
webclient/dist/index.html
View
webclient/src/stores/auth.js