-
Notifications
You must be signed in to change notification settings - Fork 480
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 organizationSyncOptions prop to clerkMiddleware() options #1634
Add organizationSyncOptions prop to clerkMiddleware() options #1634
Conversation
- `signInUrl?` | ||
- `publishableKey` | ||
- `string` | ||
|
||
An alternative sign in URL. | ||
The Clerk publishable key for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page. | ||
|
||
--- | ||
|
||
- `signUpUrl?` | ||
- `secretKey?` | ||
- `string` | ||
|
||
An alternative sign up URL. | ||
The Clerk secret key for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page. The `CLERK_ENCRYPTION_KEY` environment variable must be set when providing `secretKey` as an option, refer to [Dynamic keys](#dynamic-keys). | ||
|
||
--- | ||
|
||
- `publishableKey` | ||
- `signInUrl?` | ||
- `string` | ||
|
||
The Clerk publishable key for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page. | ||
An alternative sign in URL. | ||
|
||
--- | ||
|
||
- `secretKey?` | ||
- `signUpUrl?` | ||
- `string` | ||
|
||
The Clerk secret key for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page. The `CLERK_ENCRYPTION_KEY` environment variable must be set when providing `secretKey` as an option, refer to [Dynamic keys](#dynamic-keys). | ||
An alternative sign up URL. |
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.
This is all just a re-arrangement - I noticed that the list was almost alphabetized, and now it's alphabetized.
> no change will be made to the previously active organization. Components must detect this case and respond with an | ||
> appropriate error (e. g., `notFound()`, an | ||
> [organization switcher](/docs/components/organization/organization-switcher), etc.). |
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.
🔧 This sentence and examples in parentheses was confusing to me, because responding by rendering the org switcher doesn't seem to fall into the category of an appropriate error
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.
How does that feel?
Hey, here’s your docs preview: https://clerk.com/docs/pr/1634 |
Co-authored-by: Mary Zhong <[email protected]>
It causes our linter to fail: https://github.com/clerk/clerk-docs/actions/runs/11462466478/job/31893925923?pr=1634 it'd be nice if the linter allowed for glossary links, but i'm not going to move that boulder today.
Co-authored-by: victoria <[email protected]>
b273bfa
to
7c750bc
Compare
Co-authored-by: victoria <[email protected]>
Co-authored-by: victoria <[email protected]>
Thank you @victoriaxyz for those improvements! |
Co-authored-by: victoria <[email protected]>
Co-authored-by: victoria <[email protected]>
Co-authored-by: victoria <[email protected]>
Co-authored-by: victoria <[email protected]>
Co-authored-by: victoria <[email protected]>
Co-authored-by: victoria <[email protected]>
This reverts commit 0220928. Decided that we like the personal account highlight. Here's my justification for any future readers who are interested In general, our section links are quite good - the section title we link to makes it clear that the article is talking about the term of interest. In this case, we don't have a "personal account" definition to jump to with a section link. As a user, if I was promised the definition of Personal Account and the link went to https://clerk.com/docs/organizations/organization-workspaces#organization-workspaces-in-the-clerk-dashboard, there's a good chance i'd read the long title and think "ugh, I don't want to read up on the complete theory of organization workspaces in the dashboard right now thank you", and navigate away. I think the text highlight would point me to the part i'm actually interested in! It's a little bit brittle though - if we restructure the page in the future so that the first appearance of "Personal account" isn't the definition, this will seem broken. Tradeoffs! I think it's worth it in this case, but not a big deal either way.
This reverts commit e9ff7c3. We like the test highlighting after all. My justification for anyone interested: In general, our section links are quite good - the section title we link to makes it clear that the article is talking about the term of interest. In this case, we don't have a "personal account" definition to jump to with a section link. As a user, if I was promised the definition of Personal Account and the link went to https://clerk.com/docs/organizations/organization-workspaces#organization-workspaces-in-the-clerk-dashboard, there's a good chance i'd read the long title and think "ugh, I don't want to read up on the complete theory of organization workspaces in the dashboard right now thank you", and navigate away. I think the text highlight would point me to the part i'm actually interested in! It's a little bit brittle though - if we restructure the page in the future so that the first appearance of "Personal account" isn't the definition, this will seem broken. Tradeoffs! I think it's worth it in this case, but not a big deal either way.
After actually digesting https://clerk.com/docs/organizations/organization-workspaces#organization-workspaces-in-the-clerk-dashboard, i think that's probably not the best thing to link to! The use-case i'm talking to isn't about the dashboard at all - it's building custom apps. The dashboard happens to consume this feature also, so it has "personal accounts", but those docs are specifically about what personal accounts mean to the dashboard, not to any application.
- <code>[Pattern](#pattern)\[]</code> | ||
|
||
Specifies URL patterns that are organization-specific, containing an organization ID or slug as a path parameter. If a request | ||
matches this path, the organization identifier will be extracted and activated before rendering. |
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.
when you say "the organization identifier will be activated", do you mean the organization identifier will be used to set that org as active?
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.
Yes, and I like your wording better!
Co-authored-by: Alexis Aguilar <[email protected]>
Co-authored-by: Alexis Aguilar <[email protected]>
Thanks Alexis!
Depends on the release of clerk/javascript#4320
Preview
https://clerk.com/docs/pr/1634/references/nextjs/clerk-middleware#clerk-middleware-next-js
What changed?
This PR documents a new middleware option introduced in clerk/javascript#3977
What's next?