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 add extraParams to token request and refresh token request #130

Closed
Xbloud opened this issue Nov 16, 2023 · 5 comments · Fixed by #134
Closed

Allow to add extraParams to token request and refresh token request #130

Xbloud opened this issue Nov 16, 2023 · 5 comments · Fixed by #134

Comments

@Xbloud
Copy link

Xbloud commented Nov 16, 2023

I am using OAuth public client with authorozation code flow, refresh token and resource imdicators (RFC 8707).
The mentioned RFC adds the resource parameter to the authorization, token and refresh token requests. Unfortunatelly, it is not possible to pass the resource parameter to the token request and refresh token request.

The mentioned resource parameter can be a single string or an array of strings which brings additional issue. extraParams of type Record cannot hold multiple items with the same key. Moreover, serialization to query string using UrlSearchParams does not convert a Record with a property of type array os strings correctly
An example of such a Record is { resource: [ "r1", "r2"]} which should be serialized to "resource=r1&resource=r2".

@larsilus
Copy link

Hi, this is also needed for Microsoft Graph OAuth2 Auth Code Flow. We need to set the parameter resource=https%3A%2F%2Fgraph.microsoft.com

As of now, your lib does not work for Microsoft OAuth.

@evert
Copy link
Collaborator

evert commented Jan 17, 2024

Thanks, helpful to know! Support specifically for resource is planned

@larsilus
Copy link

Please let me know, if i can quickly test the "resource" param or support you there. I am working for a project that needs a dependency free flexible library, that also can be used with other applications like Atlassian Jira.
Do you think, it will feasible to be added in a week or so (again, can i help or test?). We are currently in the process of selecting a oauth client library approach, and i like this lib here very much. Probably i can only stick to it, if microsoft can be connected.

@larsilus
Copy link

@evert great!

@evert
Copy link
Collaborator

evert commented Jan 18, 2024

@larsilus A quick test would def help ! Let me know =)

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

Successfully merging a pull request may close this issue.

3 participants