Class: SpreeCmCommissioner::UserFbTokenAuthenticator

Inherits:
BaseInteractor show all
Defined in:
app/interactors/spree_cm_commissioner/user_fb_token_authenticator.rb

Instance Method Summary collapse

Instance Method Details

#callObject

:fb_access_token, :tenant_id (optional)



6
7
8
9
10
11
12
13
14
15
16
# File 'app/interactors/spree_cm_commissioner/user_fb_token_authenticator.rb', line 6

def call
  context.fail!(message: 'fb_access_token_missing') unless fb_access_token

  context.user = if checker.user.nil?
                   register_user
                 else
                   checker.user
                 end

  context.fail!(message: 'account_temporarily_deleted') if context.user.soft_deleted?
end