-
Notifications
You must be signed in to change notification settings - Fork 261
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
Malformed callback redirect when it already contains query string #317
Comments
I see, thanks for sharing it. Not sure at what point precisely you add that additional querystring parameter to the callback URL (assuming that it is dynamic), but alternatively you can have a handler before the Grant middleware where you read that value and put it in session instead, you can even put it in the Grant session itself https://github.com/simov/grant/blob/master/examples/dynamic-state/express.js and then inside the final |
I'm using Strapi which uses When the user clicks the login URL on
We have these endpoints
Callback
I cannot change I hope this was clear 😂 |
Thanks for the thorough explanation, I might reconsider this feature 👍 |
First of all, thanks for the library.
When I have a Provider
callback
that contains already a query string, the final redirect location seems to be malformedCallback
Redirect Location
As you can see the query symbol (
?
) is already included in the Callback.When the Redirect Location is created, the query symbol gets added again (see before
id_token
).This issue creates problems when you try to parse the final URL
This comes from this line
grant/lib/response.js
Line 108 in 500ab20
Meanwhile, this gets fixed, I'm using this patch workaround
patches/grant+5.4.24.patch
Redirect Location with patch
The text was updated successfully, but these errors were encountered: