strongmind-auth 1.1.130 → 1.1.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdea7796aff5be69bf43b1698f45b13bdda49b98b82820b39ac994f1fbf9aa7a
4
- data.tar.gz: 3e6d886004d96faf9ee693edf1dc26526adbffdc9f884f385b5fab7820aabd43
3
+ metadata.gz: 379c216fe35cd20101fe7c5c678cf8b1962a6e07e767cc6674600ca62b0c6d82
4
+ data.tar.gz: 0455fa318d4ee4996196998655037f272136827089ad3a695941502720dbd23d
5
5
  SHA512:
6
- metadata.gz: 57919bc480e88993f59974441b0be1d9f0e25fd9e0924730410cad98071bf97261771ba192ed7cf0535f6b23aa1968b7af21d630700bd27402b94538709a430c
7
- data.tar.gz: 970fe8a81aa9cafdbc32e916c6aea4b4eb76bb297bd00cb91e339377ca098306da6ec743d31003827e2021c96291b51967b62182d592260d7724b85455e9daa9
6
+ metadata.gz: 5cd3a8019c77fde8657ebc90f19f4e50bbb0e0448441fc0efdd6e87c878267ad5f441154802c2b9238f0cf2c83cf2959881503cf2e3ac376ea47ab07a3a46dde
7
+ data.tar.gz: 3f872997981262f1972e219def3d1630e16042f3adad73ffde9e0d92abf72c2a603be9b14b10e9fdfeb0e566e43d871c28c202d5b22c5cc5b6a4213c15c8d196
@@ -80,6 +80,18 @@ module JwtUtilities
80
80
  ENV['IDENTITY_CLIENT_SECRET'])
81
81
  begin
82
82
  if tokens.nil?
83
+ if session_data[:refresh_token].nil?
84
+ Rails.logger.error "[DEBUG] NIL REFRESH TOKEN DETECTED - User: #{current_user&.id}, will cause ArgumentError"
85
+
86
+ Sentry.capture_message("Nil refresh_token detected", extra: {
87
+ user_id: current_user&.id,
88
+ session_keys: session_data&.keys,
89
+ session_data: session_data&.to_h,
90
+ has_cached_tokens: current_user&.auth_token_cache.present?,
91
+ controller_action: "#{self.class}#user_jwt"
92
+ })
93
+ end
94
+
83
95
  tokens = auth_client.new_refresh_token(session_data[:refresh_token])
84
96
  else
85
97
  auth_client.refresh_session(session: tokens)
@@ -7,13 +7,19 @@ module Users
7
7
 
8
8
  def strongmind
9
9
  auth = request.env['omniauth.auth']
10
+ Rails.logger.info "[DEBUG] OAUTH CALLBACK - User: #{@user&.id}, Auth: #{auth.inspect}"
10
11
  User.auth_token_cache = auth
11
12
  @user = User.with_credentials(auth)
12
13
 
13
14
  render plain: "You do not have permission to access this application.", status: :unauthorized and return if @user.nil?
14
15
 
15
- reset_session
16
- session[:refresh_token] = auth.credentials['refresh_token']
16
+ if auth.credentials['refresh_token'].blank?
17
+ Rails.logger.error "[DEBUG] OAUTH MISSING REFRESH TOKEN - User: #{@user&.id}"
18
+ end
19
+
20
+ reset_session
21
+ session[:refresh_token] = auth.credentials['refresh_token']
22
+
17
23
  flash.delete(:notice)
18
24
 
19
25
  if @user.persisted?
@@ -35,9 +35,16 @@ module Users
35
35
  end
36
36
  end
37
37
 
38
- def initiate_backchannel_logout
39
- redirect_to user_strongmind_omniauth_authorize_url, allow_other_host: true and return unless current_user
40
- user_token_info = fetch_user_token_info
38
+ def initiate_backchannel_logout
39
+ Rails.logger.info "[DEBUG] INITIATE BACKCHANNEL LOGOUT - User: #{current_user&.id}, Session: #{session.id}, Refresh Token: #{session[:refresh_token]}"
40
+
41
+ redirect_to user_strongmind_omniauth_authorize_url, allow_other_host: true and return unless current_user
42
+
43
+ if session[:refresh_token].blank? && current_user&.auth_token_cache.blank?
44
+ Rails.logger.error "[DEBUG] LOGOUT ISSUE DETECTED - User: #{current_user.id}, Session: #{session.id}, No tokens available"
45
+ end
46
+
47
+ user_token_info = fetch_user_token_info
41
48
 
42
49
  id_token_hint = user_token_info[:id_token]
43
50
  current_user&.invalidate_all_sessions!
@@ -1,5 +1,5 @@
1
1
  module Strongmind
2
2
  module Auth
3
- VERSION = "1.1.130"
3
+ VERSION = "1.1.135"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.130
4
+ version: 1.1.135
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Belding
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-17 00:00:00.000000000 Z
11
+ date: 2025-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails