-
Notifications
You must be signed in to change notification settings - Fork 354
feat(clerk-js,clerk-react,nextjs): Introduce <APIKeys />
AIO component
#5858
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: b1e175c The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Are we launching with this immediately? Are we doing any private or public betas ? |
We have an early access program for machine auth currently and I think we'll just be using this PR for snapshots for now |
} | ||
|
||
export interface APIKeysSettingsResource extends ClerkResource { | ||
enabled: boolean; |
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 not just for the beta period, right ?
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, this is already in prod
<SegmentedControl.Button | ||
value='never' | ||
text='Never' | ||
/> | ||
<SegmentedControl.Button | ||
value='30d' | ||
text='30 days' | ||
/> | ||
<SegmentedControl.Button | ||
value='90d' | ||
text='90 days' | ||
/> | ||
<SegmentedControl.Button | ||
value='custom' | ||
text='Custom' |
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.
Localization still missing here
variant='caption' | ||
colorScheme='secondary' | ||
> | ||
Created at{' '} |
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.
ditto localization
colorScheme='secondary' | ||
> | ||
Created at{' '} | ||
{apiKey.createdAt.toLocaleDateString(undefined, { |
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.
you can use localization with our date modifiers.
const { user } = useUser(); | ||
const { organization } = useOrganization(); | ||
|
||
const subject = organization?.id ?? user?.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.
Does this mean from dashboard you can only turn on the feature for either orgs or users but not at the same time ?
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.
Okay, this is for the standalone <APIKeys />
component. If an org is active, we use that instead of the current user. For UserProfile page, we use the user id and vice versa.
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.
Shouldn't the developer be able to choose the subject when they mount <APIKeys />
like <APIKeys for="orgs" />
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.
Originally we allowed it, but Bryce pointed out that all of our components defaults to org or user session and does not accept a custom prop and we'd want to keep the behavior here
Co-authored-by: panteliselef <[email protected]>
Co-authored-by: panteliselef <[email protected]>
Description
<APIKeys />
AIO component (early access)Clerk.apiKeys
module, which contains methods to create, revoke and get api key secrets.<UserProfile />
and<OrganizationProfile />
components.Note:
Resolves ROBO-20
Screen.Recording.2025-06-09.at.7.00.12.PM.mov
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Enhancements
Documentation
Tests