Skip to content

🐛 fix: read role from URL param on verify-email for cross-browser redirect#789

Merged
arturasmckwcz merged 1 commit into
developfrom
arturas/fix-agent-verify-email-redirect
Jul 12, 2026
Merged

🐛 fix: read role from URL param on verify-email for cross-browser redirect#789
arturasmckwcz merged 1 commit into
developfrom
arturas/fix-agent-verify-email-redirect

Conversation

@arturasmckwcz

Copy link
Copy Markdown
Collaborator

Summary

  • The verify-email page checked n4d_pending_role cookie to decide where to redirect after verification — this broke when the link was opened in a different browser
  • Fix: read ?role= from the URL (set by the backend) as the primary signal; cookie remains as a fallback for links sent before this deploy

Test plan

  • Register as agent → receive email → open link in a different browser → lands on /register/agent/complete form, not login
  • Old-style links (no ?role= param, cookie present) still redirect correctly via the cookie fallback

🤖 Generated with Claude Code

…ks cross-browser

The cookie approach broke when the verification link was opened in a different
browser. Now reads ?role= from the URL (set by the backend) as the primary
signal, falling back to the cookie for backwards compatibility.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@arturasmckwcz arturasmckwcz merged commit 24c8241 into develop Jul 12, 2026
1 check passed
@arturasmckwcz arturasmckwcz deleted the arturas/fix-agent-verify-email-redirect branch July 12, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants