From 4b518774b1972eb68f3da438d94f2fd0c8ec6d38 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 31 Dec 2022 14:52:58 +1100 Subject: Allow Bearer tokens through, like Bot --- src/util/util/Token.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/util/util/Token.ts b/src/util/util/Token.ts index 19e64f47..ab323f2a 100644 --- a/src/util/util/Token.ts +++ b/src/util/util/Token.ts @@ -7,6 +7,7 @@ export const JWTOptions: VerifyOptions = { algorithms: ["HS256"] }; export function checkToken(token: string, jwtSecret: string): Promise { return new Promise((res, rej) => { token = token.replace("Bot ", ""); + token = token.replace("Bearer ", ""); /** in fosscord, even with instances that have bot distinction; we won't enforce "Bot" prefix, as we don't really have separate pathways for bots -- cgit 1.4.1