mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 12:35:38 +01:00
add user id
This commit is contained in:
parent
525a048b40
commit
2e3900976b
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ export const useAuth = createMiddleware(async (req, res, next) => {
|
|||
if(!payload){
|
||||
try {
|
||||
const payload = await verifier.verify(token);
|
||||
cognitoPayload = { userId: payload['cognito:username'], iat: payload['iat'] }
|
||||
cognitoPayload = { userId: payload['sub'], iat: payload['iat'] }
|
||||
} catch(error){
|
||||
if (error instanceof JwtExpiredError) {
|
||||
console.error("JWT expired!",error.message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue