okta-react-native
okta-react-native copied to clipboard
signOut from web session in SSO android giving strange redirect
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
- native login
- webview with sharing cookie
- clear cookies
- webview logout
- 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:
Could you clarify please, do you use webView or device browser to do signIn\signOut?
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 Hi..! I saw you did pass your okta session into webview. Just want to know how you did. Im facing this issue too.
- 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 ?
- 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.