Skip to content

Commit

Permalink
Merge pull request #1029 from supabase/km/set-custom-auth-header
Browse files Browse the repository at this point in the history
fix: set hasCustomAuthorizationHeader property on the AuthClient
  • Loading branch information
mansueli authored Apr 25, 2024
2 parents 1687dea + 31fc0cc commit 5fbb623
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"serve:coverage": "npm run test:coverage && serve test/coverage"
},
"dependencies": {
"@supabase/auth-js": "2.64.0",
"@supabase/auth-js": "2.64.1",
"@supabase/functions-js": "2.3.1",
"@supabase/node-fetch": "2.6.15",
"@supabase/postgrest-js": "1.15.2",
Expand Down
3 changes: 3 additions & 0 deletions src/SupabaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ export default class SupabaseClient<
flowType,
debug,
fetch,
// auth checks if there is a custom authorizaiton header using this flag
// so it knows whether to return an error when getUser is called with no session
hasCustomAuthorizationHeader: 'Authorization' in this.headers ?? false,
})
}

Expand Down

0 comments on commit 5fbb623

Please sign in to comment.