Using AuthSession to logout

We’re using AuthSession to authenticate with our OpenID Connect provider and it’s been really easy to implement, so thanks for that! I’m working on implementing logout functionality now, and in the browser I’d send the browser to our auth server’s connect/endsession endpoint with the id token.

I’ve implemented this using WebBrowser.openAuthSessionAsync, which works, but Expo still displays the prompt “Expo wants to use “” to sign in” - which is an odd interface to present the user with when they’re logging out.

Am I going about this the right way, or is there a way to present a more intuitive experience to the user?

hi @pwise, the WebBrowser authSession is implemented so that the request initially routes to our auth servers, which performs the redirects to your specified url. This is why there is in the prompt. The sign in part in the prompt is because Apple hard codes this every time you open an SFAuthenticationSession.

To workaround this, you’ll need to setup your own servers instead of using our authSession. Our code is open source, so you can look at our code and bootstrap it for your implementation, if you want. Sorry there is not an easier way to do this.

Thanks for the reply! Your explanation makes sense. If you don’t mind, can you explain how you might go about implementing OAuth/OpenID signout in a mobile app?

This is new territory for me and I feel like I’m missing something obvious here because I don’t see anyone else on these forums asking this question.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.