-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow set state in case it exists on oauth2 provider #253
Conversation
Thank you and sorry for the late response |
@@ -18,7 +18,8 @@ auth: { | |||
token_type: 'Bearer', | |||
redirect_uri: undefined, | |||
client_id: 'SET_ME', | |||
token_key: 'access_token' | |||
token_key: 'access_token', | |||
state: 'UNIQUE_AND_NON_GUESSABLE' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be random per login not documented here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad
You're right, state
must keep random and internal.
We could persist our custom values with auth storage in order to recover them on OAuth2 callback
Wouldn't it make sense to also allow for state to be set through arguments of the loginWith and login methods? |
Some times I need some values to be returned from the auth service and the state param of the Oauth2 scheme give us that option. Right now it sends a random string.