fix(plugin-users): fix initialization of sms verification (#1173)
This commit is contained in:
parent
e73695fd1e
commit
1aa5df88c3
@ -154,6 +154,11 @@ export default class UsersPlugin extends Plugin<UserPluginConfig> {
|
||||
if (!verificationPlugin) {
|
||||
return;
|
||||
}
|
||||
const systemSettingsRepo = this.db.getRepository('systemSettings');
|
||||
const settings = await systemSettingsRepo.findOne();
|
||||
if (!settings.smsAuthEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
verificationPlugin.interceptors.register('users:signin', {
|
||||
manual: true,
|
||||
|
@ -84,6 +84,7 @@ export default class VerificationPlugin extends Plugin {
|
||||
} = process.env;
|
||||
|
||||
if (
|
||||
DEFAULT_SMS_VERIFY_CODE_PROVIDER &&
|
||||
INIT_ALI_SMS_ACCESS_KEY &&
|
||||
INIT_ALI_SMS_ACCESS_KEY_SECRET &&
|
||||
INIT_ALI_SMS_VERIFY_CODE_TEMPLATE &&
|
||||
|
Loading…
Reference in New Issue
Block a user