-
Notifications
You must be signed in to change notification settings - Fork 419
chore(backend): Add optional secret property in api key response #6246
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: a25954e 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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThis change introduces an optional secret property to the API key response in the @clerk/backend package. The APIKey class constructor and its static fromJSON method are updated to support the new secret property. Additionally, the APIKeyJSON interface is modified to include an optional secret field. No other functional or structural changes are present. Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (5)`**/*.{js,jsx,ts,tsx}`: All code must pass ESLint checks with the project's conf...
📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc) List of files the instruction was applied to:
`packages/**/*.ts`: TypeScript is required for all packages
📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc) List of files the instruction was applied to:
`packages/**/*.{ts,tsx,d.ts}`: Packages should export TypeScript types alongside runtime code
📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc) List of files the instruction was applied to:
`**/*.{ts,tsx}`: Use proper TypeScript error types
📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc) List of files the instruction was applied to:
`**/*.{ts,tsx}`: Always define explicit return types for functions, especially p...
📄 Source: CodeRabbit Inference Engine (.cursor/rules/typescript.mdc) List of files the instruction was applied to:
🧠 Learnings (4)📓 Common learningspackages/backend/src/api/resources/JSON.ts (6).changeset/hungry-chairs-shake.md (4)packages/backend/src/api/resources/APIKey.ts (4)🪛 LanguageTool.changeset/hungry-chairs-shake.md[uncategorized] ~5-~5: You might be missing the article “an” here. (AI_EN_LECTOR_MISSING_DETERMINER_AN) ⏰ Context from checks skipped due to timeout of 90000ms (23)
🔇 Additional comments (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
| readonly lastUsedAt: number | null, | ||
| readonly createdAt: number, | ||
| readonly updatedAt: number, | ||
| readonly secret?: string, |
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.
Why not
| readonly secret?: string, | |
| readonly secret: string | null, |
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 was kind of tricky since only the create method actually returns a secret property. The rest does not. So adding null I think is not ideal here 👀
We'll definitely improve this along the way
Description
This PR adds a
secretproperty to the API key response which is only available in thecreatemethod:Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit