Module: NewsmastMastodon::Concerns::CustomSessionBehavior
- Extended by:
- ActiveSupport::Concern
- Includes:
- NonChannelHelper
- Defined in:
- app/controllers/newsmast_mastodon/concerns/custom_session_behavior.rb
Instance Method Summary collapse
Methods included from NonChannelHelper
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/newsmast_mastodon/concerns/custom_session_behavior.rb', line 7 def create self.resource = warden.authenticate!() unless is_non_channel? if login_blocked_for?(resource) # rubocop:disable Style/SoleNestedConditional handle_invalid_user_login(resource) return end end super do |resource| # We only need to call this if this hasn't already been # called from one of the two-factor or sign-in token # authentication methods on_authentication_success(resource, :password) unless @on_authentication_success_called end end |