fix(clerk-js): Set eTLD+1 as the domain for client_uat#3318
Merged
nikosdouvlis merged 8 commits intomainfrom May 8, 2024
Merged
fix(clerk-js): Set eTLD+1 as the domain for client_uat#3318nikosdouvlis merged 8 commits intomainfrom
nikosdouvlis merged 8 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: b6f9e58 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
brkalow
commented
May 3, 2024
Comment on lines
-46
to
-57
| export function getAllETLDs(hostname: string = window.location.hostname): string[] { | ||
| const parts = hostname.split('.'); | ||
| const memo = []; | ||
| const domains = []; | ||
|
|
||
| for (let i = parts.length - 1; i > 0; i--) { | ||
| memo.unshift(parts[i]); | ||
| domains.push(memo.join('.')); | ||
| } | ||
|
|
||
| return domains; | ||
| } |
Member
Author
There was a problem hiding this comment.
Stumbled on this, and turns out it's unused, so removed 🧹
bdb0b58 to
0ba197e
Compare
brkalow
commented
May 3, 2024
LekoArts
suggested changes
May 8, 2024
Member
brkalow
commented
May 8, 2024
| const eTLDCookie = createCookieHandler('__clerk_test_etld'); | ||
|
|
||
| export function getCookieDomain(hostname = window.location.hostname, cookieHandler = eTLDCookie) { | ||
| // only compute it once per session to avoid unnecessary cookie ops |
nikosdouvlis
approved these changes
May 8, 2024
Merged
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.
Description
Set an explicit domain value for our
clientUatcookie. This mirrors logic in FAPI. Without this, we were seeing duplicate__client_uatcookies, which causes issues when they get out of sync. I also removed an unused helper method,getAllETLDs(), that I stumbled across.Checklist
npm testruns as expected.npm run buildruns as expected.Type of change