Issues with expo and generic oauth provider
Hi,
I'm trying to integrate better-auth with my expo app, using the generic oauth provider.
I noticed a couple of issues:
I'm trying to integrate better-auth with my expo app, using the generic oauth provider.
I noticed a couple of issues:
- this part: https://github.com/better-auth/better-auth/blob/main/packages/expo/src/index.ts#L37 never seems to be true since the path is
/oauth2/callback. For now I work around this by manually patching the library, but a more robust solution is probably warrented. - I'm using
authClient.useSessionto get the state while the user is signing in. And indeed when I callauthClient.signIn.oauth2I get the login modal on ios (APP wants to use URL to Sign In). However, theisPendingfield of the session quickly toggles to
(expected) and then just as quickly toggles totruefalse, even though I haven't even had the time to click on the modal (unexpected). This is odd, I'd expectisPendingto stay
until either the sign in is completed, errored or aborted.true - Likely related to #2 but after successful sign in, the redirect specified in
callbackURLdoes not work within the app, it just stays on the same page.
Is this a bug or an issue on my end?
GitHub
The most comprehensive authentication framework for TypeScript - better-auth/better-auth