allow bot/bearer tokens through Authorization header

This commit is contained in:
Madeline 2023-08-07 19:36:43 +10:00
parent c6cd8f6581
commit 12799f3d12
No known key found for this signature in database
GPG Key ID: 80D25DA3BCB24281

View File

@ -40,6 +40,9 @@ export const checkToken = (
},
): Promise<UserTokenData> =>
new Promise((resolve, reject) => {
token = token.replace("Bot ", ""); // there is no bot distinction in sb
token = token.replace("Bearer ", ""); // allow bearer tokens
jwt.verify(
token,
Config.get().security.jwtSecret,