-
Notifications
You must be signed in to change notification settings - Fork 6k
Support Custom Parameters within OAuth Token Request #5466
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
Comments
facebook oauth2 supports a custom parameter called https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow?locale=en#reaskperms |
@mhyeon-lee It looks like the Am I misunderstanding your comment? |
@jgrandja |
Related #5547 |
@andersonkyle I just submitted #5656 which should resolve this issue. When you have a moment please take a look at the PR and let me know if this will fulfill your use case. The PR provides I think this will give you the flexibility you need? |
@jgrandja Wonderful. This fits the bill nicely. Thanks again! |
@andersonkyle PR #5656 has been re-worked a bit. However, it still provides the flexibility to customize the Access Token Request via This is now in master so please give it a try at your earliest convenience. |
Close via 229b69d |
I am looking at the docs for what you previously described about I tried to override this method by simply copying it from Furthermore, if I instead call super on the converter, I don't see a clear way in the documentation for modifying a
UPDATE: It appears I can accomplish this, but it seems a bit silly to have to deconstruct the
|
@forgo In order to customize the Token Request, you need to provide an implementation of So your latest update is one way of doing that - extending Also, just as a reminder, it's best not to comment on closed issues. If you have an issue/question please either search on Stack Overflow first and if you don't find the answer there log a new issue so we can track this better. |
Summary
When using a 3rd party OAuth provider such as Auth0 or Okta it would be very useful to allow developers to hook into the Token Request build process in order to add custom parameters. This is because the providers mentioned above have added additional parameters on top of the specification to allow for more functionality.
Examples
Auth0
audience: The unique identifier of the target API you want to access.
This parameter impacts the format of the access token
realm: String value of the realm the user belongs.
This parameter instructs Auth0 to use a particular Identity Provider.
A simple hook into the building of the request should provide sufficient flexibility for these custom parameters and any others that are introduced in the future.
NOTE: In addition to the custom parameters mentioned above, some providers use custom headers to facilitate a token request. Auth0 uses an
auth0-forwarded-for
header for brute-force protection. This is mentioned in the documentation link above.This issue is very similar to #4911 which focuses on the Authorization Request.
The text was updated successfully, but these errors were encountered: