-
Notifications
You must be signed in to change notification settings - Fork 447
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
Add chrome extension docs #1004
base: main
Are you sure you want to change the base?
Conversation
Hey, here’s your docs preview: https://clerk.com/docs/pr/1004 |
Hey! It looks like your PR makes changes to the If you need help with this, or would like me to make the necessary changes on your behalf please tag me in this PR or DM me on Slack 🤙 |
All good @bradlc. Thanks for the heads up! |
Co-authored-by: Tom Milewski <[email protected]>
|
||
## Chrome Extension CRX ID | ||
## Configure a consistent CRX ID |
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.
I think we should change the order of these? This was initially established when the CRX ID guide was required. Maybe the following order?
- React Router
- Sync Host
createClerkClient()
- Deploy to production
- Configure a CRX ID
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.
can do
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.
updated! b089102
|
||
## Sync Host | ||
## Sync your Chrome Extension with your web app |
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.
## Sync auth status between your Chrome Extension and web app
The title should probably mention something about auth or auth state.
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.
can do!
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.
updated! b089102
@@ -0,0 +1,132 @@ | |||
--- | |||
title: Sync your Chrome Extension with your web app |
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.
Same here as in ff92b58#r1809419432
With this page I'm just thinking of making the title clearer for people using search or skimming the side bar.
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.
can do!
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.
updated! b089102
docs/references/chrome-extension/configure-consistent-crx-id.mdx
Outdated
Show resolved
Hide resolved
|
||
The `createClerkClient()` helper wille initialize a new Clerk instance on demand, and refresh the session token is there is a valid, signed user. This is the same process as returning to a web application after the tab or browser was closed. | ||
It's recommended to use `createClerkClient()` for Chrome Extension's that are configured as popups. When the popup is closed, the Clerk process that normally refreshes the user's session token every 60 seconds is no longer running, and the stored session will become stale. If a request were made 60 seconds after the popup was closed, it would fail because the session token is no longer valid. By configuring `createClerkClient()` to run in a background service worker, you can ensure that the user's session is always fresh. |
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.
The original copy said "The Chrome Extension SDK provides a new feature for developers for interacting with a signed in user while the popup is closed." and then was written to be centered around popups.
So are you saying that this issue (Clerk not refreshing the user's session token) occurs in side panels as well?
|
||
## Chrome Extension CRX ID | ||
## Configure a consistent CRX ID |
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.
can do
Co-authored-by: Alexis Aguilar <[email protected]>
Co-authored-by: Alexis Aguilar <[email protected]>
Co-authored-by: Alexis Aguilar <[email protected]>
Co-authored-by: Alexis Aguilar <[email protected]>
Co-authored-by: Alexis Aguilar <[email protected]>
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.
Seems great! Just updating PLASMO_PUBLIC_SYNC_HOST
to PLASMO_PUBLIC_CLERK_SYNC_HOST
docs/references/chrome-extension/configure-consistent-crx-id.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Tom Milewski <[email protected]>
Co-authored-by: Tom Milewski <[email protected]>
Docs:
syncHost
propTodos: