File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,12 +30,7 @@ def authenticate_request!
3030 @current_user = User . unscoped . find ( @jwt_payload [ :user_id ] )
3131 @current_organization = @current_user . organization
3232
33- # Set thread-local variables BEFORE update_last_login! to ensure AuditLog creation works
34- Thread . current [ :current_organization_id ] = @current_organization . id
35- Thread . current [ :current_user_id ] = @current_user . id
36- Thread . current [ :current_user_role ] = @current_user . role
37-
38- # Update last login time
33+ # Update last login time (uses update_column which skips callbacks/audit logs)
3934 @current_user . update_last_login! if should_update_last_login?
4035 rescue Authentication ::Services ::JwtService ::AuthenticationError => e
4136 Rails . logger . error ( "JWT Authentication error: #{ e . class } - #{ e . message } " )
You can’t perform that action at this time.
0 commit comments