Prettier format pending files
This commit is contained in:
parent
bea96d2256
commit
0716b6f5e9
1 changed files with 8 additions and 4 deletions
|
|
@ -500,13 +500,14 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
|
||||||
};
|
};
|
||||||
}, [clearClientAuthState]);
|
}, [clearClientAuthState]);
|
||||||
|
|
||||||
|
|
||||||
const signOut = async () => {
|
const signOut = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const issues: string[] = [];
|
const issues: string[] = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { error: localError } = await supabase.auth.signOut({ scope: "local" });
|
const { error: localError } = await supabase.auth.signOut({
|
||||||
|
scope: "local",
|
||||||
|
});
|
||||||
if (localError?.message && !/session/i.test(localError.message)) {
|
if (localError?.message && !/session/i.test(localError.message)) {
|
||||||
issues.push(localError.message);
|
issues.push(localError.message);
|
||||||
}
|
}
|
||||||
|
|
@ -529,11 +530,14 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
|
||||||
if (globalError) {
|
if (globalError) {
|
||||||
const status = (globalError as any)?.status;
|
const status = (globalError as any)?.status;
|
||||||
if (status !== 401) {
|
if (status !== 401) {
|
||||||
issues.push(globalError.message ?? "Unable to reach authentication service.");
|
issues.push(
|
||||||
|
globalError.message ?? "Unable to reach authentication service.",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
const message = error?.message ?? "Unable to reach authentication service.";
|
const message =
|
||||||
|
error?.message ?? "Unable to reach authentication service.";
|
||||||
issues.push(message);
|
issues.push(message);
|
||||||
console.warn("Supabase global sign-out issue:", error);
|
console.warn("Supabase global sign-out issue:", error);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue