Merge pull request #770 from michael-pattern/feat/763/per-user_permissions_when_using_oauth

feat: per-user permissions when using oauth
This commit is contained in:
Jan Prochazka
2024-05-09 14:20:12 +02:00
committed by GitHub
3 changed files with 10 additions and 3 deletions

View File

@@ -137,7 +137,7 @@ module.exports = {
return { error: 'Logins not configured' };
}
const foundLogin = logins.find(x => x.login == login);
if (foundLogin && foundLogin.password == password) {
if (foundLogin && foundLogin.password && foundLogin.password == password) {
return {
accessToken: jwt.sign({ login }, tokenSecret, { expiresIn: getTokenLifetime() }),
};