strongmind-auth 1.0.15 → 1.0.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1a86df146b5b48ff39388a216c4c6f04c64af68d805d181a406dbb50166c141
4
- data.tar.gz: c4993a26e025d3de3bfc756fe3e1d845a1ae802a0ed3231e112f0c43b2a922d4
3
+ metadata.gz: 2306b7e1bd1a267836f1fef6f86f79233f31c12cd5dcb792332d822f0ad48b7a
4
+ data.tar.gz: 28f82b40cd09b68cd707d44f3da9db20050a7696576fa132f095ea730df1dbd8
5
5
  SHA512:
6
- metadata.gz: f5eebbdeea7157d04ab238a5978a2a5ba443d7527521f7321bbf8cc5dfef3561a7f23f2918284896af902ab0191dc7666249f49b987d4b919b90977b32bf7d60
7
- data.tar.gz: 840b288e4be11809e7f528a1df36a803e5c108a2375ba6ac8d85a3740f8faa49e88b0f78b6d16d5dac8ef3abb06bb8baba558174b71b056a6f7e42e53282c8ae
6
+ metadata.gz: 80a6b9990e257f8ce2c3a5a3cd84a52a6531cfbaeafaabcff14e6db4595143c5ddd0d33d24c4766c05fba0ee0f7a7e1ba1ea1fe462293d2ee463bd007c47c596
7
+ data.tar.gz: dfe36023e2f0cfac32111a853748cc01a7822959b1702416cbb3f8ee2d08f58afda4cc2ea7f80b6746b47fd9f9da3395f2a24cbf9f0424a25dc9e94d1799d91f
@@ -1,18 +1,10 @@
1
1
  class UserBase < ApplicationRecord
2
- devise :database_authenticatable, :registerable,
3
- :recoverable, :rememberable, :validatable,
4
- :omniauthable, :omniauth_providers => %i[strongmind]
2
+ devise :database_authenticatable, :omniauthable, :omniauth_providers => %i[strongmind]
5
3
 
6
4
  self.table_name = 'users'
7
5
 
8
6
  def self.with_credentials(auth)
9
- email = auth.extra.raw_info['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress']
10
- user = User.where(uid: auth.uid).first
11
- if user.nil?
12
- user ||= User.create!(uid: auth.uid, email: email, password: Devise.friendly_token[0, 20])
13
- end
14
-
15
- user
7
+ User.find_or_create_by(uid: auth.uid)
16
8
  end
17
9
 
18
10
  def self.auth_token_cache=(auth)
@@ -28,7 +20,7 @@ class UserBase < ApplicationRecord
28
20
  def auth_token_cache
29
21
  Rails.cache.read(uid)
30
22
  end
31
-
23
+
32
24
  def authenticatable_salt
33
25
  return super unless session_token
34
26
 
@@ -1,5 +1,5 @@
1
1
  module Strongmind
2
2
  module Auth
3
- VERSION = "1.0.15"
3
+ VERSION = "1.0.16"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Belding