Podpora odhlášení přes Authelia
This commit is contained in:
1 parent
6b824ce33a
commit
d41e0e9113
4 files changed
+11
-1
No files matched your search
@@ -46,8 +46,13 @@ function useProvideAuth(): AuthContextProps {
|
||||
}, [decodedToken]);
|
||||
|
||||
function logout() {
|
||||
const trusted = (decodedToken as any).trusted;
|
||||
const logoutUrl = (decodedToken as any).logoutUrl;
|
||||
setToken(null);
|
||||
setLoginName(undefined);
|
||||
if (trusted && logoutUrl?.length) {
|
||||
window.location.replace(logoutUrl);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user