mirror of
https://github.com/samanhappy/mcphub.git
synced 2026-01-09 08:08:16 -05:00
Implement OAuth client and token management with settings updates (#464)
This commit is contained in:
@@ -67,7 +67,7 @@ export const auth = async (req: Request, res: Response, next: NextFunction): Pro
|
||||
const authHeader = req.headers.authorization;
|
||||
if (authHeader && authHeader.startsWith('Bearer ') && isOAuthServerEnabled()) {
|
||||
const accessToken = authHeader.substring(7);
|
||||
const oauthToken = getToken(accessToken);
|
||||
const oauthToken = await getToken(accessToken);
|
||||
|
||||
if (oauthToken && oauthToken.accessToken === accessToken) {
|
||||
// Valid OAuth token - look up user to get admin status
|
||||
|
||||
Reference in New Issue
Block a user