feat: add sending otp

This commit is contained in:
Lakhan Samani
2022-07-29 19:49:50 +05:30
parent 0fc9e8ccaa
commit d89be44fe5
15 changed files with 231 additions and 49 deletions

View File

@@ -35,13 +35,13 @@ func InviteMembersResolver(ctx context.Context, params model.InviteMemberInput)
}
// this feature is only allowed if email server is configured
isEmailVerificationDisabled, err := memorystore.Provider.GetBoolStoreEnvVariable(constants.EnvKeyDisableEmailVerification)
EnvKeyIsEmailServiceEnabled, err := memorystore.Provider.GetBoolStoreEnvVariable(constants.EnvKeyIsEmailServiceEnabled)
if err != nil {
log.Debug("Error getting email verification disabled: ", err)
isEmailVerificationDisabled = true
EnvKeyIsEmailServiceEnabled = false
}
if isEmailVerificationDisabled {
if !EnvKeyIsEmailServiceEnabled {
log.Debug("Email server is not configured")
return nil, errors.New("email sending is disabled")
}