mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
Display verification code on mid sign in #2619
This commit is contained in:
parent
38d0d4bd9f
commit
6256d4abee
3 changed files with 9 additions and 3 deletions
|
@ -56,7 +56,10 @@ class Registrant::SessionsController < Devise::SessionsController
|
|||
session[:user_country] = response.user_country
|
||||
session[:user_id_code] = response.user_id_code
|
||||
session[:mid_session_code] = client.session_code
|
||||
render json: { message: t(:check_your_phone_for_confirmation_code) }, status: :ok
|
||||
|
||||
render json: {
|
||||
message: t(:confirmation_sms_was_sent_to_your_phone_verification_code_is, { code: response.challenge_id })
|
||||
}, status: :ok
|
||||
else
|
||||
render json: { message: t(:no_such_user) }, status: :unauthorized
|
||||
end
|
||||
|
|
|
@ -111,7 +111,10 @@ class Registrar::SessionsController < Devise::SessionsController
|
|||
if @user.persisted?
|
||||
session[:user_id_code] = response.user_id_code
|
||||
session[:mid_session_code] = client.session_code
|
||||
render json: { message: t(:check_your_phone_for_confirmation_code) }, status: :ok
|
||||
|
||||
render json: {
|
||||
message: t(:confirmation_sms_was_sent_to_your_phone_verification_code_is, { code: response.challenge_id })
|
||||
}, status: :ok
|
||||
else
|
||||
render json: { message: t(:no_such_user) }, status: :unauthorized
|
||||
end
|
||||
|
|
|
@ -513,7 +513,7 @@ en:
|
|||
log_in: 'Log in'
|
||||
phone_no: 'Phone number'
|
||||
log_in_with_mid: 'Log in with mobile-id'
|
||||
check_your_phone_for_confirmation_code: 'Check your phone for confirmation code'
|
||||
confirmation_sms_was_sent_to_your_phone_verification_code_is: 'Confirmation sms was sent to your phone. Verification code is %{code}.'
|
||||
user_signature_is_invalid: 'User signature is invalid'
|
||||
session_timeout: 'Session timeout'
|
||||
user_cancelled: 'User cancelled'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue