-
Notifications
You must be signed in to change notification settings - Fork 346
feat(chrome-extension,shared): Expand WebSSO capabilities. [SDK-836] #2246
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
Conversation
🦋 Changeset detectedLatest commit: 7d73465 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 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 |
5a4ae89
to
9e5ebbd
Compare
Swapping back to draft as I submitted an alternate approach to this in #2249. Open to discussion. |
@@ -0,0 +1,19 @@ | |||
export function validateManifest(manifest: chrome.runtime.Manifest): void { |
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.
💯 Awesome addition!
// TODO: Listen to client cookie changes and sync updates | ||
// https://developer.chrome.com/docs/extensions/reference/cookies/#event-onChanged | ||
// Will throw if manifest is invalid | ||
validateManifest(chrome.runtime.getManifest()); |
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.
🎖️
requestInit.url?.searchParams.append('_is_native', '1'); | ||
const clientCookie = await (key.instanceType === 'production' | ||
? getClientCookie(key.frontendApi, CLIENT_JWT_KEY) | ||
: getClientCookie(syncSessionHost, DEV_BROWSER_JWT_MARKER) |
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.
It seems that we can get the syncSessionHost
from manifest.json and remove the need for the extra prop.
9e5ebbd
to
3259834
Compare
3259834
to
e935e92
Compare
42667fe
to
e935e92
Compare
Closing in favor of #2277, which is basically this with a few additions. The new PR was created due to some rebase oddities with the Chrome playground PR. |
Description
Enables the ability to sync development instances of a Chrome Extension with a host app using URL-based session syncing.
More information: https://www.notion.so/clerkdev/Chrome-extensions-and-URL-based-session-syncing-135e04959e664b26a2076fc031174460
Fixes SDK-836
Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change
Packages affected
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/clerk-expo
@clerk/fastify
gatsby-plugin-clerk
@clerk/localizations
@clerk/nextjs
@clerk/clerk-react
@clerk/remix
@clerk/clerk-sdk-node
@clerk/shared
@clerk/themes
@clerk/types
build/tooling/chore