- SDK Version: 40
- Platforms(Android/iOS/web/all): Android, probably iOS
Hi! I just upgraded from the deprecated authentication method
expo-google-app-auth to AuthSession. Overall it’s been a good experience, but I’m hitting an interesting issue - if the user logs out, logging in again doesn’t work until they reload the app. This makes me thing I’m handling signing out incorrectly, but I can’t find mention of how to actually handle that in AuthSession - Expo Documentation or Authentication - Expo Documentation.
What seems to be happening is the useEffect watching
response from Google gets fulfilled when the promise is fulfilled, but a new promise isn’t generated until the app reloads. So calling
promptAsync works, and the browser opens and redirects as expected, but nothing happens when the user returns to the app - no navigation, no error, no nothing. The useEffect that’s supposed to trigger next steps doesn’t get triggered.
To make this work properly, do I need to find a way to regenerate
[request, response, promptLoginAsync], especially
response, when the user signs out? Or is there some other function I need to call?
For context, I’m only using Google authentication for the moment, set up following directions at Authentication - Expo Documentation.
Any help is appreciated - happy to provide specific code samples or configurations where useful.