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 beff5af commit d130351Copy full SHA for d130351
1 file changed
app/controllers/concerns/authenticatable.rb
@@ -23,7 +23,9 @@ def authenticate_request!
23
24
begin
25
@jwt_payload = Authentication::Services::JwtService.decode(token)
26
- @current_user = User.find(@jwt_payload[:user_id])
+
27
+ # Bypass RLS for authentication queries - we need to find the user before we can set RLS context
28
+ @current_user = User.unscoped.find(@jwt_payload[:user_id])
29
@current_organization = @current_user.organization
30
31
# Update last login time
0 commit comments