GRN-56: Correctly implemented the account verification flow (#367)

* Correctly implemented the account verification flow

* Fixed issues with redirect locations
This commit is contained in:
farhatahmad
2019-02-22 16:47:02 -05:00
committed by Jesus Federico
parent 5521402ee7
commit c60e25f71c
17 changed files with 337 additions and 141 deletions

View File

@ -178,6 +178,7 @@ en:
sessions: Sessions
settings: Room Settings
start: Start
unavailable: This room is currently unavailable due to the owner's email not being verified.
update_settings_error: There was an error updating the room settings
update_settings_success: Room settings successfully updated
wait:
@ -222,6 +223,11 @@ en:
For details, see the %{href}.
update: Update
verify:
title: Verify your email
resend: Resend verification email
accept: Verify
activated: Account verified!
already_verified: Account has already been verified
invalid: Invalid verification link
not_verified: Your account has not been verified yet.
resend: Resend verification email
signin: Please sign in to access your account.
title: Verify your email

View File

@ -34,14 +34,15 @@ Rails.application.routes.draw do
# Password reset resources.
resources :password_resets, only: [:new, :create, :edit, :update]
# Account activation resources
scope '/account_activations' do
get '/', to: 'account_activations#show', as: :account_activation
get '/edit', to: 'account_activations#edit', as: :edit_account_activation
get '/resend', to: 'account_activations#resend', as: :resend_email
end
# User resources.
scope '/u' do
# Verification Routes
scope '/verify' do
match '/resend', to: 'users#resend', via: [:get, :post], as: :resend
match '/confirm/:user_uid', to: 'users#confirm', via: [:get, :post], as: :confirm
end
# Handles login of greenlight provider accounts.
post '/login', to: 'sessions#create', as: :create_session