Guest access without bearer token
sekrett opened this issue · comments
I would like a configuration option allowing to have a guest access. If no bearer token was sent, then authenticate_and_set_user
should just return without any error and current_user
would be left as nil
. The line to change is this: https://github.com/Gokul595/api_guard/blob/master/lib/api_guard/jwt_auth/authentication.rb#L28
I managed myself to create a different before_action
based on authenticate_and_set_resources
doing exactly what I want, but a configuration for letting both behaviours would be great. Tell me if you need this in your gem, I will do a PR.