okta / samples-android

samples-android
https://github.com/okta/samples-android
Apache License 2.0
37 stars 52 forks source link

Secondary sign-out page won't allow us to fully sign-out #73

Open BousmanBE opened 2 years ago

BousmanBE commented 2 years ago

When we use the React Native Browser Sign-In sample and tell the application to log us out, it doesn't fully log us out of the system. We were told by our internal IT that we have to call an additional sign-out URL in order to fully clear out our session. The problem is that when we do this via Chrome, it sometimes works and sometimes it doesn't because it appears to open this secondary URL in a different tab so you basically have to close every tab/browser that's open in order for it to actually work. Not to mention, once you do this secondary sign-out, it keeps you in Chrome instead of redirecting back to the app the way the endSessionRedirectUri does.

JayNewstrom commented 2 years ago

Hi, thanks for the issue.

Could you give us the methods that you're calling? Have you looked at the documentation, and what each method does here? https://github.com/okta/okta-react-native#signout

viveknov commented 2 years ago

Hi Team,

We are trying to implement OKTA-react-native in React native hooks and it's giving us undefined when we are going to Signout in React native hooks but in Class Component, it's giving correct Signout response ({ resolve_type: 'signed_out' }).Please provide valuable feedback.

const onLogOut = async () => {

await signOut().then(result => {
 console.log('OKTA_result_:;'+ JSON.stringify(result));
   })

.catch(error => { // { code: '', message: '', detail: { message: '', status: '' } } console.log('OKTA_error_Job Details:;'+ JSON.stringify(error)) })}

JayNewstrom commented 2 years ago

@NikitaAvraimov-okta could you take a look at this one? Internal Ref: OKTA-442028

NikitaAvraimov-okta commented 2 years ago

@BousmanBE can you clarify reproduction steps? Are you trying to sign out from several okta orgs?

BousmanBE commented 2 years ago

@NikitaAvraimov-okta please direct any questions/requests to @viveknov as he is part of the development team and I'm more of just a man-in-the-middle. As for your question, we have our https://logindev.nov.com site that if you're not an NOV user, it will just use that site to log you in, however, if you are an NOV user, it will redirect you to our https://myaccount.nov.com website. So for NOV users, when we go to logout, the /logout call will log us out of the logindev.nov.com site but we're still logged in to the myaccount.nov.com site so when we go to log back in, it doesn't prompt us to login again because it still thinks we're signed into the myaccount.nov.com site. Let me know if that makes sense or not.

BousmanBE commented 2 years ago

@NikitaAvraimov-okta along with this, when the Okta token expires, we are unable to login again as it's trying to use the old token but it's expired so it just sits there and tries to login but never will.