You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
I have recently used react-oauth2-pkce to integrate with an OAuth 2.0 provide called ForgeRock. Everything worked and integrated well. However, in this particular instance of ForgeRock, they had set up multiple login flows and the way to select which flow we wanted to use is to pass in an additional query string parameter to the authorize endpoint (e.g. flow=login2). Looking at the code, there is no way for me the add additional query string parameters to the authorize endpoint as the code adds the query string part and won't account for any query string parameters that may already exist in the authorizeEndpoint prop.
It would be great if the above lines of code in AuthService.ts didn't hardcode the ? character and instead first tried to detect whether the authorizationEndpoint already has a query string at the end of it. If it has a query string, then the parameters like clientId, scopes, code_challenge can simply be appended to the end. Otherwise, if the authorizationEndpoint (or logoutEndpoint) URL doesn't have a query string, then it adds the ? character first before appending the necessary query string parameters.
Would love to hear your thoughts on this or if there is currently already a way for me to add an additional query string parameter.
Thank you.
The text was updated successfully, but these errors were encountered:
sidm1983
changed the title
Add support for additional query string parameters to be added to the authorizeEndpoint & tokenEndpoint props
[Enhancement] Add support for additional query string parameters to be added to the authorizeEndpoint & tokenEndpoint props
Feb 11, 2022
sidm1983
changed the title
[Enhancement] Add support for additional query string parameters to be added to the authorizeEndpoint & tokenEndpoint props
[Enhancement] Add support for additional query string parameters to be added to the authorizeEndpoint & logoutEndpoint props
Feb 11, 2022
I just looked at the list of active pull requests, and it looks like someone has already added this enhancement. Pull request #28 is what I need to be able to pass in a custom querystring parameter into the authorizationEndpoint prop.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I have recently used
react-oauth2-pkce
to integrate with an OAuth 2.0 provide called ForgeRock. Everything worked and integrated well. However, in this particular instance of ForgeRock, they had set up multiple login flows and the way to select which flow we wanted to use is to pass in an additional query string parameter to the authorize endpoint (e.g.flow=login2
). Looking at the code, there is no way for me the add additional query string parameters to the authorize endpoint as the code adds the query string part and won't account for any query string parameters that may already exist in the authorizeEndpoint prop.react-oauth2-pkce/src/AuthService.ts
Line 159 in b0d9fea
react-oauth2-pkce/src/AuthService.ts
Line 192 in b0d9fea
It would be great if the above lines of code in
AuthService.ts
didn't hardcode the?
character and instead first tried to detect whether the authorizationEndpoint already has a query string at the end of it. If it has a query string, then the parameters likeclientId
,scopes
,code_challenge
can simply be appended to the end. Otherwise, if the authorizationEndpoint (or logoutEndpoint) URL doesn't have a query string, then it adds the?
character first before appending the necessary query string parameters.Would love to hear your thoughts on this or if there is currently already a way for me to add an additional query string parameter.
Thank you.
The text was updated successfully, but these errors were encountered: