Improve other auth methods in proxy
cgen-322a0a56df934064950e20a7a07ef977
This commit is contained in:
parent
3d50af82cd
commit
01bec84abb
1 changed files with 3 additions and 3 deletions
|
|
@ -70,7 +70,7 @@ export const supabase = new Proxy(supabaseClient || {}, {
|
|||
}
|
||||
},
|
||||
signOut: async () => {
|
||||
if (isSupabaseConfigured && target.auth) {
|
||||
if (isSupabaseConfigured && target && target.auth) {
|
||||
try {
|
||||
return await target.auth.signOut();
|
||||
} catch (error) {
|
||||
|
|
@ -80,7 +80,7 @@ export const supabase = new Proxy(supabaseClient || {}, {
|
|||
return await mockAuth.signOut();
|
||||
},
|
||||
getUser: async () => {
|
||||
if (isSupabaseConfigured && target.auth) {
|
||||
if (isSupabaseConfigured && target && target.auth) {
|
||||
try {
|
||||
return await target.auth.getUser();
|
||||
} catch (error) {
|
||||
|
|
@ -90,7 +90,7 @@ export const supabase = new Proxy(supabaseClient || {}, {
|
|||
return await mockAuth.getUser();
|
||||
},
|
||||
getSession: async () => {
|
||||
if (isSupabaseConfigured && target.auth) {
|
||||
if (isSupabaseConfigured && target && target.auth) {
|
||||
try {
|
||||
return await target.auth.getSession();
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue