-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Bug: Redirect URI mismatch when attempting to complete login flow
Summary
The incoming url in the below snippet may not match the correct protocol when using a reverse proxy (ALB). This in turn causes an issue when verifying the token as the URL created doesn't match what was supplied to redirect_uri.
auth0-hono/src/middleware/callback.ts
Line 33 in 2a2db63
| >(createRouteUrl(c.req.url, baseURL), c); |
Expected Behavior
The login interaction is able to complete and the user is logged in.
Actual Behavior
An error is thrown because the redirect_uri doesn't match what was supplied when initiating the login flow.
Impact
- Users are unable to login.
Suggested Fix
Either:
- Use just the pathname as the first argument,
c.req.pathvsc.req.url- Writing this ticket, dawned on me, there could be search params, so we would want path + search params
- Ensure the
c.req.urlprotocol matches thebaseUrlprotocol
butameron
Metadata
Metadata
Assignees
Labels
No labels