Skip to content

Commit

Permalink
chore: remove mocked jwt
Browse files Browse the repository at this point in the history
  • Loading branch information
vinicius-sacramento committed Sep 17, 2024
1 parent 2e56404 commit 45ffbc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/api/src/jwt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const createSessionToken = async (signedSessionData: SignedPayload) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const token = jwt.sign(
tokenData,
"95614424651656c92f70fcc90980fbf25607a87e9fa487d913f455cc740cbd79",
process.env.JWT_SECRET!,
jwtOptions(),
);

Expand All @@ -62,7 +62,7 @@ export const decodeJwtSessionToken = (token: string): { userKey: string } => {
const { userKey } = jwt.verify(
token,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
"95614424651656c92f70fcc90980fbf25607a87e9fa487d913f455cc740cbd79",
process.env.JWT_SECRET!,
jwtOptions(),
) as TokenData;

Expand All @@ -74,7 +74,7 @@ export function isJwtTokenValid(token: string) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const decodedToken = jwt.verify(
token,
"95614424651656c92f70fcc90980fbf25607a87e9fa487d913f455cc740cbd79",
process.env.JWT_SECRET!,
{
algorithms: ["HS256"],
issuer: "commune-ts",
Expand Down

0 comments on commit 45ffbc1

Please sign in to comment.