mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Don't need to extend ActiveSupport::Concern anymore in oauth helpers
This commit is contained in:
parent
fbac68d51a
commit
6a09daf570
2 changed files with 3 additions and 4 deletions
|
@ -24,7 +24,7 @@ module Devise
|
||||||
attr_accessor :password_confirmation
|
attr_accessor :password_confirmation
|
||||||
end
|
end
|
||||||
|
|
||||||
# Generators password encryption based on the value given.
|
# Generates password encryption based on the given value.
|
||||||
def password=(new_password)
|
def password=(new_password)
|
||||||
@password = new_password
|
@password = new_password
|
||||||
self.encrypted_password = password_digest(@password) if @password.present?
|
self.encrypted_password = password_digest(@password) if @password.present?
|
||||||
|
|
|
@ -3,17 +3,16 @@ module Devise
|
||||||
# Provides a few helpers that are included in ActionController::Base
|
# Provides a few helpers that are included in ActionController::Base
|
||||||
# for convenience.
|
# for convenience.
|
||||||
module Helpers
|
module Helpers
|
||||||
extend ActiveSupport::Concern
|
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
# Overwrite expire_session_data_after_sign_in! so it removes all
|
# Overwrite expire_session_data_after_sign_in! so it removes all
|
||||||
# oauth tokens from session ensuring registrations done in a row
|
# oauth tokens from session ensuring registrations done in a row
|
||||||
# do not try to store the same token in the database.
|
# do not try to store the same token in the database.
|
||||||
def expire_session_data_after_sign_in!
|
def expire_session_data_after_sign_in!
|
||||||
super
|
super
|
||||||
session.keys.grep(/_oauth_token$/).each { |k| session.delete(k) }
|
session.keys.grep(/_oauth_token$/).each { |k| session.delete(k) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue