Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
wip signin
Browse files
src/lib/stores/use-user.ts
CHANGED
@@ -6,8 +6,8 @@ export const userStore = writable<any>(null);
|
|
6 |
|
7 |
export const openWindowLogin = async () => {
|
8 |
const response = await fetch(`/api/auth/login`);
|
9 |
-
const {
|
10 |
-
if (
|
11 |
window.open(redirect, "_blank");
|
12 |
}
|
13 |
};
|
|
|
6 |
|
7 |
export const openWindowLogin = async () => {
|
8 |
const response = await fetch(`/api/auth/login`);
|
9 |
+
const { redirect } = await response.json();
|
10 |
+
if (redirect) {
|
11 |
window.open(redirect, "_blank");
|
12 |
}
|
13 |
};
|