Module: Auth::Concerns::SmsOtpConcern

Extended by:
ActiveSupport::Concern
Includes:
ChiefModelConcern
Defined in:
app/models/auth/concerns/sms_otp_concern.rb

Instance Method Summary collapse

Instance Method Details

#check_otp_errorsObject



26
27
28
# File 'app/models/auth/concerns/sms_otp_concern.rb', line 26

def check_otp_errors
	
end

#send_sms_otpObject



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'app/models/auth/concerns/sms_otp_concern.rb', line 33

def send_sms_otp
	##the user model will call the initial step of actually sending the sms otp.
	
	##we do this step because it is possible that send_sms_otp
    ##can be called from a resend_otp requirement, in which case
    ##the additional_login_param_status will already be 1, and we
    ##wont need to save it.
    #if self.additional_login_param_status_changed?
    #  self.skip_send_sms_otp_callback = true
    #  self.save 
    #end
    
end

#verify_sms_otp(otp) ⇒ Object

overridden in the model that implements this concern, whoever calls this method , must set the self.additional_login_param_pre_request_status to 2, at the end of successfull verification,since this is needed for password recovery, unlocks mechanisms.



50
51
52
# File 'app/models/auth/concerns/sms_otp_concern.rb', line 50

def verify_sms_otp(otp)
	
end