You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.
Hello,
What the title says: on authentication failure, the app renders "Authorization Failed", instead of the json I'm trying to render. Here is my code:
def create
user = authenticate_session(session_params)
if sign_in(user)
render json: user, serializer: AuthenticationSerializer, root: :user
else
render json: { errors: 'Wrong email or password' }, status: :unauthorized
end
end
There is no problem when the user authenticates correctly, the problem is only when it fails.
Any suggestions?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
What the title says: on authentication failure, the app renders "Authorization Failed", instead of the json I'm trying to render. Here is my code:
There is no problem when the user authenticates correctly, the problem is only when it fails.
Any suggestions?
Thanks!
The text was updated successfully, but these errors were encountered: