diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-31 14:52:58 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-31 14:52:58 +1100 |
commit | bc086a070c7837396240b522e93df2bf32fdc478 (patch) | |
tree | 426d1e108f8c59360467369ea8febe2a0e67aac3 /src | |
parent | Add WS_LOGEVENTS and WS_VERBOSE env vars (diff) | |
download | server-bc086a070c7837396240b522e93df2bf32fdc478.tar.xz |
Allow Bearer tokens through, like Bot
Diffstat (limited to 'src')
-rw-r--r-- | src/util/util/Token.ts | 1 |
1 files changed, 1 insertions, 0 deletions
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<any> { 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 |