Podpora odhlášení přes Authelia

This commit is contained in:
mates committed 2023-08-08 21:32:11 +02:00
1 parent 6b824ce33a
commit d41e0e9113
4 files changed
+11 -1

No files matched your search

+2 -1
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);
}
/**