okta-react-native icon indicating copy to clipboard operation
okta-react-native copied to clipboard

signOut from web session in SSO android giving strange redirect

Open gabrielmirandat opened this issue 4 years ago • 3 comments

I'm submitting a:

  • [x] Bug report
  • [ ] Feature request
  • [ ] Other (Describe below)

Current behavior

I developed an app that makes native login and share session cookies with webview. Then, when I access the webview, it handle the cookies and make the login redirect creating the web session. But when I logout inside webview, after cleaning cookies, the webview redirects to https://<okta_domain>/signin/refresh-auth-state/<some_code> when in android. In ios, the session is cleaned correctly, app terminates redirection.

Expected behavior

Same as ios, cleaned session.

Minimal reproduction of the problem with instructions

  1. native login
  2. webview with sharing cookie
  3. clear cookies
  4. webview logout
  5. native logout

Extra information about the use case/user story you are trying to implement

Implement SSO between react native and reactjs

Environment

mac os

  • Package Version: 1.8.1
  • React Native Version: "^0.63.4"
  • OS: macos 13
  • Node version (node -v): v14.16.1
  • Other:

gabrielmirandat avatar Aug 05 '21 05:08 gabrielmirandat

Could you clarify please, do you use webView or device browser to do signIn\signOut?

NikitaAvraimov-okta avatar Aug 05 '21 08:08 NikitaAvraimov-okta

I do signIn in native, then share cookies with webview to create a session there. Now I need to signOut from all sessions (native and web)

gabrielmirandat avatar Aug 06 '21 19:08 gabrielmirandat

@gabrielmirandat Hi..! I saw you did pass your okta session into webview. Just want to know how you did. Im facing this issue too.

  1. How did you get okta session cookies? from @okta/okta-auth-js library? I use OktaAuth and could get accessToken/idToken, but not session cookies.. how did you get it ?
  2. In WebView, how did you create a session there ? Its not like this ? <WebView source={{ uri: 'https://site.com/' }} sharedCookiesEnabled="true" ... />

I saw your post in another github, but I still couldnt figure out how. Please help me. Thanks in advance.

AmySmile0 avatar Aug 30 '23 20:08 AmySmile0