diff --git a/src/_staart/rest/group.ts b/src/_staart/rest/group.ts index 2bacf247a..376af4fe2 100644 --- a/src/_staart/rest/group.ts +++ b/src/_staart/rest/group.ts @@ -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, diff --git a/src/_staart/rest/user.ts b/src/_staart/rest/user.ts index dd110293f..16bde48a7 100644 --- a/src/_staart/rest/user.ts +++ b/src/_staart/rest/user.ts @@ -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 } } }, });