Podpora odhlášení přes Authelia

This commit is contained in:
2023-08-08 21:32:11 +02:00
parent 6b824ce33a
commit d41e0e9113
4 changed files with 11 additions and 1 deletions

View File

@@ -17,7 +17,8 @@ export function generateToken(login?: string, trusted?: boolean): string {
if (!login || login.trim().length === 0) {
throw Error("Nebyl předán login");
}
return jwt.sign({ login, trusted: trusted || false }, process.env.JWT_SECRET);
const payload = { login, trusted: trusted || false, logoutUrl: process.env.LOGOUT_URL };
return jwt.sign(payload, process.env.JWT_SECRET);
}
/**