strongmind-auth 1.0.14 → 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: bc46e88e501287e0a5cc68e2955f02bdbc57846ddb57d857c9bb4a059d7b575e
4
- data.tar.gz: 2c0975de9ae802db081741d997486478203fd53664a099711842fbf5ce94054b
3
+ metadata.gz: 2306b7e1bd1a267836f1fef6f86f79233f31c12cd5dcb792332d822f0ad48b7a
4
+ data.tar.gz: 28f82b40cd09b68cd707d44f3da9db20050a7696576fa132f095ea730df1dbd8
5
5
  SHA512:
6
- metadata.gz: 1ed12a69efd46d42d554b2f1943de7c4915889a24b4aa589acf9649fab081c429bd0e9b0e655c027f3f7921df3da25cdafbae82b7887ed765b33d967f1eec0f7
7
- data.tar.gz: a0a0d134a2ec866ca987498cb10c766f9b746c60dcf852d028cec7cd70b7b326e2c5a3642fde99fcfac7c20d397c609a3ff8e686c756d7e7018ddc6a2620696b
6
+ metadata.gz: 80a6b9990e257f8ce2c3a5a3cd84a52a6531cfbaeafaabcff14e6db4595143c5ddd0d33d24c4766c05fba0ee0f7a7e1ba1ea1fe462293d2ee463bd007c47c596
7
+ data.tar.gz: dfe36023e2f0cfac32111a853748cc01a7822959b1702416cbb3f8ee2d08f58afda4cc2ea7f80b6746b47fd9f9da3395f2a24cbf9f0424a25dc9e94d1799d91f
@@ -26,7 +26,7 @@ module StrongMindNav
26
26
 
27
27
  def menu_items
28
28
  [
29
- { name: 'Home', icon: 'fa-solid fa-house', path_method: :root_path }
29
+ { name: 'Home', icon: 'fa-solid fa-house', url: root_path }
30
30
  ]
31
31
  end
32
32
 
@@ -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
 
@@ -20,7 +20,7 @@ module Strongmind
20
20
  before_action :authenticate_user!
21
21
  before_action :fetch_common_nav
22
22
 
23
- rescue_from Exceptions::RefreshTokenExpiredError do
23
+ rescue_from Strongmind::Exceptions::RefreshTokenExpiredError do
24
24
  current_user&.invalidate_all_sessions!
25
25
  redirect_to \"#{ENV['IDENTITY_BASE_URL']}/connect/endsession\", headers: {
26
26
  'Content-Type' => 'application/json'
@@ -30,7 +30,7 @@ module Strongmind
30
30
  # Implement the list of menu items for the application
31
31
  # def menu_items
32
32
  # [
33
- # { name: 'Home', icon: 'fa-solid fa-house', path_method: :root_path }
33
+ # { name: 'Home', icon: 'fa-solid fa-house', url: root_path }
34
34
  # ]
35
35
  # end
36
36
 
@@ -1,5 +1,5 @@
1
1
  module Strongmind
2
2
  module Auth
3
- VERSION = "1.0.14"
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.14
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Belding