I have a custom auth strategy (it is the default strategy), which has an authenticate! function.
def authenticate!
if validation_success
success!(resource)
else
fail(:invalid_token)
end
end
I want to modify it so that in the ‘else’ part of the loop, I directly return a 404 from this code itself.
The production environment automatically handles record not found and routing errors with a 404.