Open davidhartley opened 5 years ago
Are you testing with the sample? I have seen the first issue with the sample. The sample doesn't show logout functionality properly. It does a log out in the browser to clear the cache but it doesn't revoke and clear the tokens in the app. So when it redirects back to the application it still have valid tokens. The sample should revoke and clear the token if end session completes.
I have not tried the second case but from the description it looks like another issue with the sample.
This is using our organization's app, not the sample.
I've tried using the revoke token and clearSession as well but it doesn't seem to affect this situation. I'm not convinced that sign out is in working order. I don't see anything in the documentation about the process other than the signOutFromOkta method.
It looks like the wrong completion intent is hung onto by Okta in login/logout and gets sent depending on which one is called first. For example, if I log in successfully, then log out, the completion intent for login is called instead of the one provided for logout. But if I hard close the app and start from the logged in state, logging out works OK, but login does not. Seems to be a bug though it's hard to tell if that's the only problem.
The issue is with OktaAppAuth using a application context to start the logout process. This should never work but for some odd reason this worked sometimes with different devices. I've submitted a fix. You have to pass in the Activity context in init.
That's not the case - I am passing an Activity context in init.
Yes the app may be passing in the Activity context but the constructor in OktaAppAuth is calling getApplicationContext()
protected OktaAppAuth(Context context) {
mContext = context.getApplicationContext();
This appears to still be an issue in version 0.2.2 - logout and login work independently, but if you try to do one then the other, it sends you to the wrong completion intent.
Hi David,
I suspect it is something to do with OktaManagementActivity saving and restoring instance state. It is probably extracting the instance state from the old instance so the completion intent is wrong. I'll investigate further and put in a fix if this is the case.
I've been trying to get version 0.2.1 logout (signOutFromOkta) working and I've run into troubles. Is this supposed to be working in this version?
Here are my two trouble cases: