mirror of
https://github.com/omniauth/omniauth.git
synced 2022-11-09 12:31:49 -05:00
Fixing registration post phase.
This commit is contained in:
parent
21e5fd0c09
commit
e96a4688e4
2 changed files with 6 additions and 0 deletions
|
@ -9,6 +9,11 @@ module OmniAuth
|
|||
|
||||
self.abstract_class = true
|
||||
has_secure_password
|
||||
|
||||
def self.auth_key=(key)
|
||||
super
|
||||
validates_uniqueness_of key, :case_sensitive => false
|
||||
end
|
||||
|
||||
def self.locate(key)
|
||||
where(auth_key => key).first
|
||||
|
|
|
@ -55,6 +55,7 @@ module OmniAuth
|
|||
def registration_phase
|
||||
attributes = (options[:fields] + [:password, :password_confirmation]).inject({}){|h,k| h[k] = request[k.to_s]; h}
|
||||
if @identity = model.create(attributes)
|
||||
env['PATH_INFO'] = callback_path
|
||||
callback_phase
|
||||
else
|
||||
registration_form
|
||||
|
|
Loading…
Reference in a new issue