Add decorateUrl to navigate callbacks for Safari ITP support#3037
Open
nikosdouvlis wants to merge 1 commit intocore-3from
Open
Add decorateUrl to navigate callbacks for Safari ITP support#3037nikosdouvlis wants to merge 1 commit intocore-3from
nikosdouvlis wants to merge 1 commit intocore-3from
Conversation
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.
|
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
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