Open
Description
Problem:
There is a specific circumstance where it's impossible to sign-in anymore till the deletion of _session
cookie in Chrome(Android) or Safari(iOS), even if the prompt=login
.
Related issue here openid/AppAuth-Android#874 and how it is solved
Steps to reproduce the issue, assuming you have a signin with auto code exchange and prompt=login
, i.e should always force a new login:
- You log-in in your app
- You clear the data / uninstall app
- From LogTo, you must delete the account where you logged in at step 1
- Open the app and try to login: you get always "invalid-grant"
PlatformException(authorize_and_exchange_code_failed, Failed to authorize: [error: invalid_grant, description: grant request is invalid], null, null)
What would be the correct flow:
- //
- //
- //
- You should be able to login again, because
prompt=login
should be a guarantee that any (corrupted or not corrupted)_session cookie previously stored in the browser won't prevent you to login again
Explanations:
- Seems that somehow is read the
_session
cookie that points to "dead" user information (deleted). The user will not be able to login anymore till he manually delete the_session
cookie in Chrome.
Possible solution:
- Find a way to set
max_age: 0
along withprompt=login
, so that the_session
cookie auto-expire. In the specs there is actually an OpenID param called max-age or max-auth-age but I'm not sure LogTo implement it.
You can notice, in the photo below that_session
is valid for 2 weeks from login, it should be always 0 whenprompt=login
is used
