mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-05 18:32:33 +01:00
Allow Bearer tokens through, like Bot
This commit is contained in:
parent
0a09abbbfa
commit
bc086a070c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user