Skip to content

Remember the last mobile sign-in method - #7207

Merged
ComputelessComputer merged 5 commits into
mainfrom
fix/mobile-last-used-sign-in
Aug 31, 2026
Merged

Remember the last mobile sign-in method#7207
ComputelessComputer merged 5 commits into
mainfrom
fix/mobile-last-used-sign-in

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Note

Medium Risk
Touches auth callback handling and session deduplication; incorrect method propagation or race behavior could affect sign-in UX but not broad security surface area.

Overview
Adds last-used sign-in method on mobile: the auth provider loads and saves the method in AsyncStorage after a successful browser handoff, exposes lastSignInMethod on context, and the sign-in sheet highlights the matching provider with a Last used badge.

The web auth handoff now carries an optional method query param through desktop/mobile deeplinks and /callback/auth redirects (OAuth, email password desktop flow, OTP confirm, and existing-user desktop reauth), so the app can learn the method from the callback URL when present. Mobile also awaits session setup on duplicate deep links by sharing in-flight setSession promises instead of dropping repeat callbacks.

Unit tests cover method parsing on mobile and callback/deeplink builders on web.

Reviewed by Cursor Bugbot for commit 0132bd3. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploy Preview for anarlog canceled.

Name Link
🔨 Latest commit 0132bd3
🔍 Latest deploy log https://app.netlify.com/projects/anarlog/deploys/6a95519c0bda800008ca2458

Comment thread apps/mobile/src/auth/context.tsx
@ComputelessComputer
ComputelessComputer force-pushed the fix/mobile-last-used-sign-in branch 2 times, most recently from 7dedb31 to d975b54 Compare August 31, 2026 07:19
Comment thread apps/mobile/src/auth/context.tsx Outdated
@ComputelessComputer
ComputelessComputer force-pushed the fix/mobile-last-used-sign-in branch from 9ae1748 to d0b6c6f Compare August 31, 2026 07:53
Comment thread apps/web/src/routes/auth.tsx
@ComputelessComputer
ComputelessComputer force-pushed the fix/mobile-last-used-sign-in branch from d0b6c6f to 7fd181d Compare August 31, 2026 08:06

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b79d742. Configure here.

Comment thread apps/web/src/routes/auth.tsx
@ComputelessComputer
ComputelessComputer force-pushed the fix/mobile-last-used-sign-in branch from b79d742 to fa7f727 Compare August 31, 2026 09:56
Base automatically changed from fix/mobile-sign-in-sheet to main August 31, 2026 10:04
Carry the completed email or reauthentication method into the callback URL.
Carry the provider or auth view through desktop retries before falling back to remembered state.
@ComputelessComputer
ComputelessComputer force-pushed the fix/mobile-last-used-sign-in branch from fa7f727 to 0132bd3 Compare August 31, 2026 10:04
@ComputelessComputer
ComputelessComputer merged commit acc06c8 into main Aug 31, 2026
19 of 20 checks passed
@ComputelessComputer
ComputelessComputer deleted the fix/mobile-last-used-sign-in branch August 31, 2026 10:10
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