fix: trim =
off the user id base64 too in the token
This commit is contained in:
parent
2c998c8302
commit
32919ca405
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue