Skip to content
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

Prevent a token creating another token #1335

Merged
merged 3 commits into from
Jul 1, 2024
Merged

Conversation

a3957273
Copy link
Member

No description provided.

@@ -17,6 +17,11 @@ interface CreateTokenProps {

const nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQSRTUVWXYZ')
export async function createToken(user: UserInterface, { description, scope, modelIds, actions }: CreateTokenProps) {
if (user.token) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could you create a quick unit test for this? :)

@a3957273 a3957273 merged commit dca2639 into main Jul 1, 2024
14 checks passed
@a3957273 a3957273 deleted the bug/no-token-recreation branch July 1, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants