Skip to content

Commit 5fbb623

Browse files
authored
Merge pull request #1029 from supabase/km/set-custom-auth-header
fix: set hasCustomAuthorizationHeader property on the AuthClient
2 parents 1687dea + 31fc0cc commit 5fbb623

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"serve:coverage": "npm run test:coverage && serve test/coverage"
4141
},
4242
"dependencies": {
43-
"@supabase/auth-js": "2.64.0",
43+
"@supabase/auth-js": "2.64.1",
4444
"@supabase/functions-js": "2.3.1",
4545
"@supabase/node-fetch": "2.6.15",
4646
"@supabase/postgrest-js": "1.15.2",

src/SupabaseClient.ts

+3
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ export default class SupabaseClient<
277277
flowType,
278278
debug,
279279
fetch,
280+
// auth checks if there is a custom authorizaiton header using this flag
281+
// so it knows whether to return an error when getUser is called with no session
282+
hasCustomAuthorizationHeader: 'Authorization' in this.headers ?? false,
280283
})
281284
}
282285

0 commit comments

Comments
 (0)