Module: User::OAuthAuthorizable

Extended by:
ActiveSupport::Concern
Included in:
User
Defined in:
app/models/user/oauth_authorizable.rb

Overview

OAuthAuthrorizable registers the authorized user

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#oauth_authorized?(provider) ⇒ Boolean


32
33
34
# File 'app/models/user/oauth_authorizable.rb', line 32

def oauth_authorized?(provider)
  identities.find_by(provider: provider).present? && persisted?
end