feat(react): enable OAuth in React Native#80
Merged
Conversation
This was referenced Apr 2, 2026
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
2 times, most recently
from
April 7, 2026 11:21
3ebc21a to
eab2596
Compare
andrascodes
force-pushed
the
andras/feat-add-expo-example-app
branch
2 times, most recently
from
April 7, 2026 16:17
accf679 to
d265505
Compare
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
from
April 7, 2026 16:17
eab2596 to
5c951dd
Compare
andrascodes
force-pushed
the
andras/feat-add-expo-example-app
branch
from
April 20, 2026 10:11
d265505 to
ef7beaa
Compare
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
from
April 20, 2026 10:11
5c951dd to
6ca2eba
Compare
andrascodes
marked this pull request as ready for review
April 23, 2026 07:26
andrascodes
changed the base branch from
andras/feat-add-expo-example-app
to
andras/feat-expo-example-add-passkey-auth-and-test-on-android
April 24, 2026 16:39
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
2 times, most recently
from
April 24, 2026 17:57
6cee6db to
cce8e30
Compare
andrascodes
force-pushed
the
andras/feat-expo-example-add-passkey-auth-and-test-on-android
branch
from
April 24, 2026 17:57
ad00a9e to
358ac5e
Compare
SahilVasava
reviewed
Apr 28, 2026
This was referenced Apr 29, 2026
SahilVasava
reviewed
Apr 29, 2026
SahilVasava
reviewed
Apr 29, 2026
SahilVasava
reviewed
Apr 29, 2026
SahilVasava
reviewed
Apr 29, 2026
SahilVasava
reviewed
Apr 29, 2026
SahilVasava
reviewed
Apr 29, 2026
SahilVasava
left a comment
Collaborator
There was a problem hiding this comment.
Architecture is right — pluggable getSessionId is a much cleaner native story than what the old design could have grown into. Five inline notes:
- 🟡 No timeout on
getSessionIdWeb— promise hangs on stuck popups - 🟡
popup.closedchecked before URL — closed-vs-success race - 🟡 Native
dismissBrowser()only on success — auth tab stays open on error - 🟡 Same
returnTopath-drop as #143 fixed — cherry-pick when rebasing - 🟡
Variablestype only in this hook — drop by aligning action'sParameters
Nothing blocking the architectural direction; all addressable in this PR or follow-ups.
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
from
May 4, 2026 13:12
167a4f2 to
b9acfc8
Compare
andrascodes
force-pushed
the
andras/feat-expo-example-add-passkey-auth-and-test-on-android
branch
from
May 13, 2026 12:00
31c7756 to
fed766a
Compare
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
from
May 13, 2026 12:00
7415541 to
6b21283
Compare
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
from
May 13, 2026 14:38
6b21283 to
bce6dbe
Compare
andrascodes
force-pushed
the
andras/feat-expo-example-add-passkey-auth-and-test-on-android
branch
from
May 13, 2026 16:07
e3ffa73 to
c50c4eb
Compare
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
from
May 13, 2026 16:07
bce6dbe to
718a845
Compare
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
from
May 13, 2026 17:08
718a845 to
8944716
Compare
andrascodes
force-pushed
the
andras/feat-expo-example-add-passkey-auth-and-test-on-android
branch
from
May 13, 2026 17:08
c50c4eb to
0581bb2
Compare
andrascodes
changed the base branch from
andras/feat-expo-example-add-passkey-auth-and-test-on-android
to
main
May 14, 2026 05:50
andrascodes
force-pushed
the
andras/feat-react-enable-oauth-in-react-native
branch
from
May 14, 2026 05:50
8944716 to
425ad67
Compare
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
OmarBasem
pushed a commit
that referenced
this pull request
May 14, 2026
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.
This PR is part of a stack created with Aviator.
mainCloses FS-1922, FS-2000
This PR comes after #124. So make sure you review #124 before this one if you want to go in a chronological order.
Update: Changed this PR to be on top of the stack and added Passkeys and Android setup before this. This way this PR can be tested by just running
pnpm androidand using the Android Emulator.Refactored the OAuth implementation in
wallet-reactto be more contained in a single place so it's easier to create web and mobile modules for it.The new structure of the
authenticateOAuthaction looks like this:The main change is the behavior of the web OAuth flow. The new code doesn't rely on using
postMessageand a message listener anymore. It instead polls for the URL change of the popup. The main advantage of this is that we don't need any of the additional code that we had in the old logic where the popup had to open, load the app, run JS to detect the OAuth callback and complete the auth with thesessionId. We can do that all in thegetSessionIdWebmodule. This meant that we could get rid of the OAuth related code inconnector.ts.So the new logic just checks the URL of the popup every 250ms and if it's on the same origin (same URL as the app) then it tries to get the sessionId param off of the query params.
An additional security advantage to this is that checking for same origin is implicit as we can't get the popup's URL across origins. So if the popup is still on the Google OAuth flow the check errors on
popup.location.hrefalready. In the old flow we had to make sure to check fororigin === expectedOriginto be secure.