Skip to content

Commit a5c685f

Browse files
committed
Merge branch 'feat/allow-promises-in-CookieAuthStorageAdapter' into ssr-use-storage-adapter
PR supabase#609
2 parents a6b35ca + b24279d commit a5c685f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/shared/src/cookieAuthStorageAdapter.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ export abstract class CookieAuthStorageAdapter implements StorageAdapter {
1515
};
1616
}
1717

18-
protected abstract getCookie(name: string): string | undefined | null;
18+
protected abstract getCookie(
19+
name: string
20+
): string | undefined | null | Promise<string | undefined | null>;
1921
protected abstract setCookie(name: string, value: string): void;
2022
protected abstract deleteCookie(name: string): void;
2123

22-
getItem(key: string): string | Promise<string | null> | null {
23-
const value = this.getCookie(key);
24+
async getItem(key: string): Promise<string | null> {
25+
const value = await this.getCookie(key);
2426

2527
if (!value) return null;
2628

0 commit comments

Comments
 (0)