Skip to content

Commit

Permalink
fix refreshing token
Browse files Browse the repository at this point in the history
  • Loading branch information
Laoujin committed Jan 14, 2025
1 parent abfcdef commit 5a47875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/controllers/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function verify(token: string): Promise<string | IUser> {


export const refreshToken = async (req: Request, res: Response) => {
const ourToken = jwt.sign({data: (req as any).user}, config.jwt.secret, {expiresIn: config.jwt.expiresIn});
const ourToken = jwt.sign({data: (req as any).user.data}, config.jwt.secret, {expiresIn: config.jwt.expiresIn});
return res.status(200).send({jwt: ourToken});
};

Expand Down

0 comments on commit 5a47875

Please sign in to comment.