mirror of
https://github.com/danbee/my-images
synced 2025-03-04 08:49:05 +00:00
OAuth is definitely working this time... ;)
This commit is contained in:
parent
dcf1a7999f
commit
2911dee281
@ -2,7 +2,7 @@ class User < ActiveRecord::Base
|
||||
def self.find_or_create_from_auth(auth)
|
||||
user = User.find_by(provider: auth.provider, uid: auth.uid)
|
||||
if user.blank?
|
||||
User.create(provider: auth.provider,
|
||||
user = User.create(provider: auth.provider,
|
||||
uid: auth.uid,
|
||||
username: auth.info.nickname,
|
||||
name: auth.info.name)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user