Skip to content

Commit

Permalink
fix introspection auth check
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Goodman committed Jul 15, 2024
1 parent aecd0ae commit 5b87630
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/handlers/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ export const server = startServerAndCreateLambdaHandler<MyContext>(apolloServer,
});
}

// removing the initial "Bearer "
const token = authorization.substring(7);
const isAuthorized = isTokenValid(token);
const isAuthorized = isTokenValid(authorization);
if (!isAuthorized) {
throw new GraphQLError('User is not authorized to access this resource', {
extensions: { code: 'FORBIDDEN', http: { status: 403 } },
Expand Down

0 comments on commit 5b87630

Please sign in to comment.