fix: trim = off the user id base64 too in the token

This commit is contained in:
TheClashFruit 2024-08-29 23:00:20 +02:00
parent 2c998c8302
commit 32919ca405
Signed by: TheClashFruit
GPG key ID: 09BB24C34C2F3204

View file

@ -106,7 +106,7 @@ class Database {
const uid = await this.createUser(user);
const sum = crypto.createHmac('sha256', process.env.AUTH_SECRET!);
const base = Buffer.from(user.id).toString('base64');
const base = Buffer.from(user.id).toString('base64').replaceAll('=', '');
const date = Buffer.from((Date.now() - 1688940000000).toString()).toString('base64').replaceAll('=', '');
sum.update(userData.access_token);