2016-11-15 09:56:29 -06:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-10-03 09:38:22 -05:00
|
|
|
class Auth::ConfirmationsController < Devise::ConfirmationsController
|
|
|
|
layout 'auth'
|
2017-12-30 17:20:07 -06:00
|
|
|
|
2018-07-30 18:14:33 -05:00
|
|
|
before_action :set_body_classes
|
2017-11-21 00:13:37 -06:00
|
|
|
before_action :set_pack
|
2017-09-10 02:58:38 -05:00
|
|
|
|
Change unconfirmed user login behaviour (#11375)
Allow access to account settings, 2FA, authorized applications, and
account deletions to unconfirmed and pending users, as well as
users who had their accounts disabled. Suspended users cannot update
their e-mail or password or delete their account.
Display account status on account settings page, for example, when
an account is frozen, limited, unconfirmed or pending review.
After sign up, login users straight away and show a simple page that
tells them the status of their account with links to account settings
and logout, to reduce onboarding friction and allow users to correct
wrongly typed e-mail addresses.
Move the final sign-up step of SSO integrations to be the same
as above to reduce code duplication.
2019-07-22 03:48:50 -05:00
|
|
|
skip_before_action :require_functional!
|
2018-02-03 22:42:13 -06:00
|
|
|
|
|
|
|
private
|
|
|
|
|
2018-06-21 16:48:54 -05:00
|
|
|
def set_pack
|
|
|
|
use_pack 'auth'
|
|
|
|
end
|
|
|
|
|
2018-07-30 18:14:33 -05:00
|
|
|
def set_body_classes
|
|
|
|
@body_classes = 'lighter'
|
|
|
|
end
|
|
|
|
|
2018-12-24 12:12:38 -06:00
|
|
|
def after_confirmation_path_for(_resource_name, user)
|
|
|
|
if user.created_by_application && truthy_param?(:redirect_to_app)
|
|
|
|
user.created_by_application.redirect_uri
|
|
|
|
else
|
|
|
|
super
|
|
|
|
end
|
|
|
|
end
|
2016-10-03 09:38:22 -05:00
|
|
|
end
|