Skip to content

Conversation

@nikosdouvlis
Copy link
Member

…tellite sync flow

Description

WIP - description to be added soon

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@nikosdouvlis nikosdouvlis changed the title fix(clerk-js,backend): Do not depend on _clerk_synced to terminate sa… fix(clerk-js,backend): Do not depend on _clerk_synced to terminate satellite sync flow Nov 7, 2024
}

private shouldUseSuffixed(): boolean {
public usesSuffixedCookies(): boolean {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the same code - git diff messes with formatting here.
I dropped the suffixedCookies prop that was getting initialized in the ctor in favor of a simple function to simplify things a little.

@nikosdouvlis nikosdouvlis force-pushed the nikos/fix-satellite-issues-with-redirects branch from ad3da85 to ffa1009 Compare November 7, 2024 19:35
@changeset-bot
Copy link

changeset-bot bot commented Nov 7, 2024

🦋 Changeset detected

Latest commit: 92a8a1f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@clerk/clerk-js Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/remix Patch
@clerk/clerk-sdk-node Patch
@clerk/tanstack-start Patch
@clerk/testing Patch

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

@nikosdouvlis nikosdouvlis force-pushed the nikos/fix-satellite-issues-with-redirects branch 5 times, most recently from a42af24 to 883b8f2 Compare November 11, 2024 11:56
Comment on lines +513 to +515
const isRequestEligibleForMultiDomainSync =
authenticateContext.isSatellite && authenticateContext.secFetchDest === 'document';

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual change, correct ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. I will check the clerk_go side shortly but we can push these changes independently

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clerk-js change is also important as we couldn't remove the param before for nextjs apps.

Comment on lines 2011 to 2016
removeClerkQueryParam(CLERK_SYNCED);
removeClerkQueryParam('__clerk_handshake');
removeClerkQueryParam('__clerk_help');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to batch these ? To avoid calling replaceState multiple times ? Can this affect routers from host frameworks ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes a difference as we're calling replace here but I can definitely test

@nikosdouvlis
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @nikosdouvlis - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 1.4.9-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/backend 1.16.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/chrome-extension 1.3.32-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/clerk-js 5.33.0-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/elements 0.19.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/clerk-expo 2.3.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/expo-passkeys 0.0.3-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/express 1.3.11-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/fastify 2.0.13-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/localizations 3.6.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/nextjs 6.3.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/clerk-react 5.15.3-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/remix 4.2.49-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/clerk-sdk-node 5.0.62-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/shared 2.12.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/tanstack-start 0.4.25-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/testing 1.3.23-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/themes 2.1.43-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/types 4.32.0-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/ui 0.1.18-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212
@clerk/vue 0.0.2-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/astro@1.4.9-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/backend

npm i @clerk/backend@1.16.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.3.32-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.33.0-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/elements

npm i @clerk/elements@0.19.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.3.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/expo-passkeys

npm i @clerk/expo-passkeys@0.0.3-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/express

npm i @clerk/express@1.3.11-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.0.13-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/localizations

npm i @clerk/localizations@3.6.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.3.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.15.3-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/remix

npm i @clerk/remix@4.2.49-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.62-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/shared

npm i @clerk/shared@2.12.1-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.4.25-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/testing

npm i @clerk/testing@1.3.23-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/themes

npm i @clerk/themes@2.1.43-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/types

npm i @clerk/types@4.32.0-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/ui

npm i @clerk/ui@0.1.18-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@clerk/vue

npm i @clerk/vue@0.0.2-snapshot.v883b8f2a0ce72a656f1f61a1c1fc8aa933e51212 --save-exact

@nikosdouvlis nikosdouvlis force-pushed the nikos/fix-satellite-issues-with-redirects branch from 883b8f2 to 349dd3b Compare November 11, 2024 17:16
Comment on lines +2012 to +2014
// @nikos: we're looking into dropping this param completely
// in the meantime, we're removing it here to keep the URL clean
removeClerkQueryParam(CLERK_SUFFIXED_COOKIES);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should never make it to the client, I'm pretty sure it being added to the redirect is a bug in FAPI that needs to be fixed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's exactly the case, I'll get to the bottom of it tomorrow

@nikosdouvlis nikosdouvlis merged commit ff4ebeb into main Nov 13, 2024
22 of 23 checks passed
@nikosdouvlis nikosdouvlis deleted the nikos/fix-satellite-issues-with-redirects branch November 13, 2024 09:12
wobsoriano pushed a commit that referenced this pull request Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants