Update login with multiple auth methods to toggle button and logic

This commit is contained in:
Tuan Dang
2023-08-12 13:53:55 +07:00
parent 69605a1a54
commit dbd55441f2
15 changed files with 384 additions and 429 deletions
@@ -3,7 +3,7 @@ import { Types } from "mongoose";
import { BotOrgService } from "../../../services";
import { SSOConfig } from "../../models";
import {
AuthProvider,
AuthMethod,
MembershipOrg,
User
} from "../../../models";
@@ -171,7 +171,7 @@ export const updateSSOConfig = async (req: Request, res: Response) => {
}
},
{
authProviders: [AuthProvider.EMAIL],
authProviders: [AuthMethod.EMAIL],
$unset: {
authProvider: 1,
}