Class: IdentityClient::User

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/identity_client/user.rb

Class Method Summary collapse

Class Method Details

.create_with_omniauth(auth) ⇒ Object



5
6
7
8
9
10
11
# File 'app/models/identity_client/user.rb', line 5

def self.create_with_omniauth(auth)
  create! do |user|
    user.provider = auth["provider"]
    user.uid = auth["uid"]
    user.name = "#{auth["info"]['first_name']} #{auth['info']['last_name']}"
  end
end