Skip to content
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 to pass state parameter #119

Closed
yordis opened this issue Apr 22, 2023 · 1 comment
Closed

Allow to pass state parameter #119

yordis opened this issue Apr 22, 2023 · 1 comment

Comments

@yordis
Copy link
Contributor

yordis commented Apr 22, 2023

Hey there,

We would like to pass the state parameter:

state: gen_state(),

We want to marshal some JSON payload as base64 to pass a state from the client into the oauth2 flow.

Would you be willing to add the feature?

@danschultzer
Copy link
Collaborator

danschultzer commented Apr 22, 2023

Hi @yordis! You should be able to do that using the :authorization_params config:

config
|> Keyword.put(:authorization_params, state: encoded_payload)
|> Assent.Startegy.OAuth2.authorize_url()

@yordis yordis closed this as completed Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants