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 }}
Repository navigation
Auth redirect URLs that already have a query string get a second '?' (status parameter lost) #391
If the configured URL already has a query string, for example https://app.example.com/welcome?source=email, the user is redirected to
The app then reads status as missing, and source becomes email?status=verified.
Expected
https://app.example.com/welcome?source=email&status=verified, so both parameters survive.
Steps to reproduce
Set the email-verified redirect URL (or the reset-password / magic-link page URL) to a URL with a query string, e.g. https://app.example.com/welcome?source=email.
Open a verification link, or an invalid or expired reset or magic link to hit the error branch.
The Location header contains two ?, and new URL(location).searchParams.get('status') is null.
A small appendQuery(url, query) helper that joins with & when the URL already contains ?. It would be used at the four call sites above. URLs without a query, including hash-router URLs, would redirect exactly as they do today. I have a branch with the helper and 4 regression tests in the existing verification / resetPassword / magicLink vitest suites. The tests call the real handlers and parse the redirect with URL. All 4 fail on main (expected 'email?status=error' to be 'email') and pass with the change, and the rest of the auth suite still passes (547/547). Branch: https://github.com/breken-ai/modelence/tree/fix/auth-redirect-query-string
CONTRIBUTING asks for an issue first for auth runtime changes, so I'm opening this first. If this approach works for you, I'll open the PR.
Activity
fix(auth): set status params correctly on auth redirect URLs
fix(auth): set status params correctly on auth redirect URLs (modelen…