We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc346c9 commit 4658c18Copy full SHA for 4658c18
app/models/api_authentication/session.rb
@@ -30,6 +30,7 @@ class ApiAuthentication::Session < ApiAuthentication::ApplicationRecord
30
31
validate :user_is_not_blocked
32
33
+ before_validation :normalize_email
34
before_validation :assign_user, if: :email_login?
35
before_validation :assign_or_create_new_user, on: :create, if: :social_login?
36
@@ -45,6 +46,13 @@ def offline!
45
46
47
private
48
49
+ #
50
+ # CALLBACKs
51
52
+ def normalize_email
53
+ self.email = self.email.to_s.downcase.presence
54
+ end
55
+
56
def assign_user
57
self.user ||= user_via_email
58
end
lib/api_authentication/version.rb
@@ -1,3 +1,3 @@
1
module ApiAuthentication
2
- VERSION = '0.2.2'
+ VERSION = '0.2.3'
3
0 commit comments