style: fix linting issues met Prettier
This commit is contained in:
parent
2578555ace
commit
868c5d9afe
2 changed files with 4 additions and 3 deletions
|
@ -40,9 +40,10 @@ async function loadUser(): Promise<User | null> {
|
|||
|
||||
const userManager = (await getUserManagers())[activeRole];
|
||||
let user = await userManager.getUser(); // Load the user from the local storage.
|
||||
if (!user) { // If the user is not in the local storage, he could still be authenticated in Keycloak.
|
||||
if (!user) {
|
||||
// If the user is not in the local storage, he could still be authenticated in Keycloak.
|
||||
try {
|
||||
user = await userManager.signinSilent()
|
||||
user = await userManager.signinSilent();
|
||||
} catch (e: unknown) {
|
||||
// When the user was previously logged in and then logged out, signinSilent throws an error.
|
||||
// In that case, the user is not authenticated anymore, so we set him to null.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue