Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKarow committed Apr 22, 2024
1 parent 263b5cb commit 458c142
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/auth/lib/cognitoJwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ const IdTokenSchema = z
.passthrough()

export const decodeCognitoIdJwt = async (jwt: string) => {
const data = await verifier('id').verify(jwt)
const data = await verifier('id').verify(jwt, { clientId: getEnv('COGNITO_CLIENT_ID') })
return IdTokenSchema.parse(data)
}
export const decodeCognitoAccessJwt = async (jwt: string) => {
const data = await verifier('access').verify(jwt)
const data = await verifier('access').verify(jwt, { clientId: getEnv('COGNITO_CLIENT_ID') })
return AccessTokenSchema.parse(data)
}

Expand Down

0 comments on commit 458c142

Please sign in to comment.