Skip to content

Commit a50725d

Browse files
authored
Merge pull request #1332 from supabase/fix/nullable-accessToken
fix: Make the return value of accessToken nullable
2 parents 1661420 + f8e48ff commit a50725d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/SupabaseClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default class SupabaseClient<
5151
protected storageKey: string
5252
protected fetch?: Fetch
5353
protected changedAccessToken?: string
54-
protected accessToken?: () => Promise<string>
54+
protected accessToken?: () => Promise<string | null>
5555

5656
protected headers: Record<string, string>
5757

src/lib/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export type SupabaseClientOptions<SchemaName> = {
7777
* Create another client if you wish to use Supabase Auth and third-party
7878
* authentications concurrently in the same application.
7979
*/
80-
accessToken?: () => Promise<string>
80+
accessToken?: () => Promise<string | null>
8181
}
8282

8383
export type GenericRelationship = {

0 commit comments

Comments
 (0)