fix(frontend): 'requiresAuth' routes niet meer zonder authenticatie toegankelijk
This commit is contained in:
parent
b8e63e3e34
commit
f94b7808f7
4 changed files with 4 additions and 10 deletions
|
@ -117,14 +117,11 @@ async function renewToken(): Promise<User | null> {
|
|||
* End the session of the current user.
|
||||
*/
|
||||
async function logout(): Promise<void> {
|
||||
console.log("LOGOUT");
|
||||
const activeRole = authStorage.getActiveRole();
|
||||
if (activeRole) {
|
||||
await (await getUserManagers())[activeRole].signoutRedirect();
|
||||
authStorage.deleteActiveRole();
|
||||
clearAuthState();
|
||||
} else {
|
||||
console.log("No active role!!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue