modified initialize org to check for auth providers

This commit is contained in:
Sheen Capadngan
2023-08-06 22:30:02 +08:00
parent bde30049bc
commit 681255187f

View File

@@ -117,7 +117,7 @@ export const completeAccountSignup = async (req: Request, res: Response) => {
if (!user)
throw new Error("Failed to complete account for non-existent user"); // ensure user is non-null
if (user.authProvider !== AuthProvider.OKTA_SAML) {
if (!user.authProviders?.includes(AuthProvider.OKTA_SAML)) {
// initialize default organization and workspace
await initializeDefaultOrg({
organizationName,