mirror of
https://github.com/TECHNOFAB11/svelte-oidc.git
synced 2025-12-14 00:43:50 +01:00
fix: user not defined after auth
This commit is contained in:
parent
4fd62abe31
commit
c6f7bcef5f
1 changed files with 8 additions and 4 deletions
|
|
@ -95,10 +95,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = await oidc.getUser();
|
const user = await oidc.getUser();
|
||||||
isAuthenticated.set(!!user);
|
|
||||||
accessToken.set(user.access_token);
|
if (user && !!user) {
|
||||||
idToken.set(user.id_token);
|
isAuthenticated.set(true);
|
||||||
userInfo.set(user.profile);
|
console.log('user', user);
|
||||||
|
accessToken.set(user.access_token);
|
||||||
|
idToken.set(user.id_token);
|
||||||
|
userInfo.set(user.profile);
|
||||||
|
}
|
||||||
isLoading.set(false);
|
isLoading.set(false);
|
||||||
}
|
}
|
||||||
async function handleOnDestroy() {}
|
async function handleOnDestroy() {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue