()
| 142 | } |
| 143 | |
| 144 | function constructRequestBody() { |
| 145 | const body = { |
| 146 | organizationId: currentUser.activeOrganizationId, |
| 147 | userId: currentUser.id, |
| 148 | providers: [ |
| 149 | { |
| 150 | providerLabel: 'Microsoft', |
| 151 | providerName: 'azure', |
| 152 | config: { |
| 153 | tenantID: azureTenantID, |
| 154 | clientID: azureClientID, |
| 155 | clientSecret: azureClientSecret |
| 156 | }, |
| 157 | status: azureConfigEnabled ? 'enable' : 'disable' |
| 158 | }, |
| 159 | { |
| 160 | providerLabel: 'Google', |
| 161 | providerName: 'google', |
| 162 | config: { |
| 163 | clientID: googleClientID, |
| 164 | clientSecret: googleClientSecret |
| 165 | }, |
| 166 | status: googleConfigEnabled ? 'enable' : 'disable' |
| 167 | }, |
| 168 | { |
| 169 | providerLabel: 'Auth0', |
| 170 | providerName: 'auth0', |
| 171 | config: { |
| 172 | domain: auth0Domain, |
| 173 | clientID: auth0ClientID, |
| 174 | clientSecret: auth0ClientSecret |
| 175 | }, |
| 176 | status: auth0ConfigEnabled ? 'enable' : 'disable' |
| 177 | }, |
| 178 | { |
| 179 | providerLabel: 'Github', |
| 180 | providerName: 'github', |
| 181 | config: { |
| 182 | clientID: githubClientID, |
| 183 | clientSecret: githubClientSecret |
| 184 | }, |
| 185 | status: githubConfigEnabled ? 'enable' : 'disable' |
| 186 | } |
| 187 | ] |
| 188 | } |
| 189 | return body |
| 190 | } |
| 191 | |
| 192 | const validateAndSubmit = async () => { |
| 193 | const validationErrors = validateFields() |
no outgoing calls
no test coverage detected