[Fix #1096] Github Oauth
This commit is contained in:
parent
46b14e97ed
commit
7c0fdbc9f8
7 changed files with 68 additions and 3 deletions
|
@ -1,5 +1,9 @@
|
|||
class Administration < ActiveRecord::Base
|
||||
# Include default devise modules. Others available are:
|
||||
# :confirmable, :lockable, :timeoutable and :omniauthable
|
||||
devise :database_authenticatable, :rememberable, :trackable, :validatable
|
||||
devise :database_authenticatable, :rememberable, :trackable, :validatable, :omniauthable, omniauth_providers: [:github]
|
||||
|
||||
def self.from_omniauth(params)
|
||||
find_by(email: params["info"]["email"])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue