(provider)
| 212 | }; |
| 213 | // To handle the test cases on configuration |
| 214 | const getValidatorForProvider = function (provider) { |
| 215 | if (provider === 'anonymous' && !_enableAnonymousUsers) { |
| 216 | return { validator: undefined }; |
| 217 | } |
| 218 | const authAdapter = loadAuthAdapter(provider, authOptions); |
| 219 | if (!authAdapter) { return; } |
| 220 | const { adapter, appIds, providerOptions } = authAdapter; |
| 221 | return { validator: authDataValidator(provider, adapter, appIds, providerOptions), adapter }; |
| 222 | }; |
| 223 | |
| 224 | const runAfterFind = async (req, authData) => { |
| 225 | if (!authData) { |
no test coverage detected