Skip to content

Commit

Permalink
fix: use payload subject as id for deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
logotip4ik committed Aug 15, 2023
1 parent ce3e1e7 commit aba4a9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export async function getUserFromEvent(event: H3Event): Promise<SafeUser | null>
return null;

return {
id: toBigInt(payload.id as string),
id: toBigInt(payload.sub as string),
email: payload.email as string,
username: payload.username as string,
};
Expand Down

0 comments on commit aba4a9d

Please sign in to comment.