PKCE in WebView: log out after native app was closed

Ok. For those who met up the same problem:
previously I was using and auth-js library (and my flow was with client credentials). So, basically, on my start page I was performing request to loginWithRedirect.
I’ve change my start page logic to:

  1. check if await authClient.isAuthenticated(); return true;
  2. if yes, perform silent check auth (authClient.getTokenSilently({}))
  3. if not, then loginWithRedirect-> handleRedirectCallback.
    Hope this will help someone!
2 Likes