Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions packages/api-graphql/src/internals/graphqlAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@ export async function headerBasedAuth(
// `fetchAuthSession()` succeeded but didn't return `tokens`.
// This may happen when unauthenticated access is enabled and there is
// no user signed in.
if (!token) {
throw new GraphQLApiError(NO_VALID_AUTH_TOKEN);
if (token) {
headers = {
Authorization: token,
};
}

headers = {
Authorization: token,
};

break;
}
case 'lambda':
Expand Down