mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-05 06:25:42 +00:00
allow bot/bearer tokens through Authorization header
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user