feat: Add manual login option and password reset link for SSO (#6328)

* consolidate IUserSettings in workflow and add allowSSOManualLogin

* add pw reset link to owners ui
This commit is contained in:
Michael Auerswald
2023-05-30 12:52:02 +02:00
committed by GitHub
parent 8f0ff460b1
commit 77e3f1551d
15 changed files with 215 additions and 35 deletions

View File

@@ -76,7 +76,10 @@ export class AuthController {
// attempt to fetch user data with the credentials, but don't log in yet
const preliminaryUser = await handleEmailLogin(email, password);
// if the user is an owner, continue with the login
if (preliminaryUser?.globalRole?.name === 'owner') {
if (
preliminaryUser?.globalRole?.name === 'owner' ||
preliminaryUser?.settings?.allowSSOManualLogin
) {
user = preliminaryUser;
usedAuthenticationMethod = 'email';
} else {