Adds support for read-only masterKey (#4297)
* Adds support for read-only masterKey * Adds tests to make sure all endpoints are properly protected * Updates readme * nits
This commit is contained in:
@@ -60,8 +60,15 @@ export class Config {
|
||||
emailVerifyTokenValidityDuration,
|
||||
accountLockout,
|
||||
passwordPolicy,
|
||||
masterKeyIps
|
||||
masterKeyIps,
|
||||
masterKey,
|
||||
readOnlyMasterKey,
|
||||
}) {
|
||||
|
||||
if (masterKey === readOnlyMasterKey) {
|
||||
throw new Error('masterKey and readOnlyMasterKey should be different');
|
||||
}
|
||||
|
||||
const emailAdapter = userController.adapter;
|
||||
if (verifyUserEmails) {
|
||||
this.validateEmailConfiguration({emailAdapter, appName, publicServerURL, emailVerifyTokenValidityDuration});
|
||||
|
||||
Reference in New Issue
Block a user