Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
♻️ Change API key, access token length to 32
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Sep 3, 2020
1 parent 5225c30 commit 63577fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_staart/rest/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ export const createApiKeyForUser = async (
)
throw new Error(INSUFFICIENT_PERMISSION);

apiKey.apiKey = randomString({ length: 20 });
apiKey.apiKey = randomString({ length: 32 });
const result = await prisma.apiKeys.create({
data: {
...apiKey,
Expand Down
2 changes: 1 addition & 1 deletion src/_staart/rest/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export const createAccessTokenForUser = async (
)
throw new Error(INSUFFICIENT_PERMISSION);

accessToken.accessToken = randomString({ length: 20 });
accessToken.accessToken = randomString({ length: 32 });
return prisma.accessTokens.create({
data: { ...accessToken, user: { connect: { id: userId } } },
});
Expand Down

0 comments on commit 63577fa

Please sign in to comment.