60 verify token is valid (#61)
This commit is contained in:
+3
-1
@@ -58,7 +58,9 @@ const context = async ({ req }) => {
|
||||
if (authHeader.startsWith('Bearer ')) {
|
||||
const token = authHeader.substring(7, authHeader.length);
|
||||
const res = await verifyToken({ token });
|
||||
return { auth: res };
|
||||
if (res.isValid) {
|
||||
return { auth: res };
|
||||
}
|
||||
} else if (
|
||||
process.env.NODE_ENV === 'development' &&
|
||||
authHeader == 'Basic ZGV2OnB2N1VmYSFiZVAzeGk='
|
||||
|
||||
Reference in New Issue
Block a user