-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Wrong currentUrl within passport strategy for v6 #733
Comments
You'll have to overwrite the currentUrl method on the Strategy instance to return the current URL then |
Yes, you're right about the Wouldn't it be better to use
|
Possibly, yeah. I'll look into it. |
Ok. Thanks for your help and your fast answer. You can close this issue if you want, the solution of upgrading express and/or redefining the For people coming here, the workaround is [edit: NOT WORKING BEHIND PROXY, SEE BELLOW]
|
|
https://github.com/panva/openid-client/releases/tag/v6.1.5 |
What happened?
I tried to use the passport strategy with Microsoft server. The redirection and login prompt happens properly, but once on the callback endpoint I get this error
I may be wrong, but I think it comes from the
currentUrl
method here:There is two issue in my case:
req.host
never contains the port, so if you are not on 80/443, it will not workreq.url
will not contain the full url if you are using anexpress.Router()
it will only give the last partI've found a workaround by redefining the
currentUrl
method:And with that, it works as expected
Version
v6.1.4
Runtime
Node.js
Runtime Details
Node v18.19.1
Code to reproduce
Required
The text was updated successfully, but these errors were encountered: