Allow Bearer tokens through, like Bot

This commit is contained in:
Madeline committed 2022-12-31 14:52:58 +11:00
1 parent 6ca65a19f2
commit 4b518774b1
1 file changed
+1
+1
View File
@@ -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