-
Notifications
You must be signed in to change notification settings - Fork 968
Add decorateUrl to navigate callbacks for Safari ITP support #3037
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
Merged
nikosdouvlis
merged 11 commits into
core-3
from
nikos/user4475-udpate-docs-with-decorateurl
Feb 10, 2026
Merged
Add decorateUrl to navigate callbacks for Safari ITP support #3037
nikosdouvlis
merged 11 commits into
core-3
from
nikos/user4475-udpate-docs-with-decorateurl
Feb 10, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why: Safari's Intelligent Tracking Prevention (ITP) limits cookies set via API responses from CNAME-cloaked subdomains to 7 days. This causes unexpected session expiration for Safari users who don't visit frequently. The new decorateUrl function in setActive/finalize navigate callbacks enables automatic cookie refresh when needed. What changed: - Updated 25 doc files with decorateUrl pattern in navigate callbacks - Pattern wraps destination URLs and checks if result is absolute (http) to determine whether to use window.location.href or router.push() - Covers all custom flows: auth, legacy auth, Expo partials - Skipped billing checkout finalize() - different API, not affected Files: oauth-connections, sign-in-or-up, email-password, email-password-mfa, email-sms-otp, passkeys, enterprise-connections, legal-acceptance, embedded-email-links, multi-session-applications, session-tasks, error-handling, forgot-password, application-invitations, expo partials
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
e3368ab to
c7a70ee
Compare
Member
…acks
The navigate callback receives an object { session, decorateUrl }, not
decorateUrl directly. Without destructuring, decorateUrl('/') would
throw at runtime.
…-docs-with-decorateurl # Conflicts: # docs/reference/components/authentication/task-choose-organization.mdx # docs/reference/components/authentication/task-reset-password.mdx # docs/reference/components/billing/subscription-details-button.mdx # docs/reference/hooks/use-subscription.mdx # docs/reference/nextjs/errors/auth-was-called.mdx
242837d to
b09a061
Compare
- Use `url` variable instead of hardcoded '/' in else branch (legacy/application-invitations) - Replace `router.push` with `window.location.href` in vanilla JS examples (multi-session, clerk.mdx) - Add missing `return` after currentTask check to prevent fall-through navigation - Remove `window.location.href` from Expo examples where it doesn't exist in React Native
…te-docs-with-decorateurl # Conflicts: # docs/guides/development/custom-flows/authentication/legacy/email-password.mdx # docs/guides/development/custom-flows/authentication/legacy/legal-acceptance.mdx # docs/guides/development/custom-flows/authentication/legacy/oauth-connections.mdx # docs/guides/development/custom-flows/authentication/legacy/sign-in-or-up.mdx # docs/reference/components/authentication/task-choose-organization.mdx # docs/reference/components/authentication/task-reset-password.mdx # docs/reference/components/billing/subscription-details-button.mdx # docs/reference/hooks/use-subscription.mdx # docs/reference/nextjs/errors/auth-was-called.mdx
alexisintech
approved these changes
Feb 10, 2026
Member
alexisintech
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks nikos 😸💖
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Summary
Updates all custom flow documentation to include the new
decorateUrlfunction innavigatecallbacks, enabling Safari ITP cookie refresh support.decorateUrlpatternWhy
Safari's Intelligent Tracking Prevention (ITP) limits cookies set via API responses from CNAME-cloaked subdomains to 7 days. This causes unexpected session expiration for Safari users who don't visit frequently. The
decorateUrlfunction wraps destination URLs and may return an absolute URL when cookie refresh is needed.The Pattern
All
navigatecallbacks now use:Related
decorateUrlworkaround to setActive javascript#7623Test plan
🤖 Generated with Claude Code