Logout using when using AuthSession and WebBrowser with the Expo Auth Proxy

Please provide the following:

  1. SDK Version: 46
  2. Platforms(Android/iOS/web/all): all

I’m using the AuthSession class for login and leveraging the Expo Auth Proxy (AuthSession - Expo Documentation). After logging in through the auth provider the redirection succeeds as expected.

However, what is the proper way of logging out? The docs don’t seem to have any class or function that specifically deals with logout, however I was able to come across some solutions that invoked openAuthSessionAsync() with a logout url. Here is what I’m doing:

// "myRedirectUrl" is in the format of "https%3A%2F%2Fauth.expo.io%2F%40<myOwner>%2F<mySlug>"
const logoutUrl = `${myCognitoDomain}/logout?client_id=${myClientId}&logout_uri=${myRedirectUrl}`

WebBrowser.openAuthSessionAsync(logoutUrl, this.redirectUri);

But when Cognito redirects the app back to auth.expo.io I’m greeted with

I think I’m missing something but I’ve been unable to find the proper docs or search result that addresses this.

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