Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user_signed_in? throws when an invalid_token is passed #56

Open
ghost opened this issue Mar 16, 2022 · 1 comment
Open

user_signed_in? throws when an invalid_token is passed #56

ghost opened this issue Mar 16, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 16, 2022

user_signed_in? calls Warden::Proxy#authenticate which ultimately calls Devise::Doorkeeper::Strategies::Doorkeeper#authenticate! which throws if a given token is invalid.

I believe the intent behind user_signed_in? and the Warden::Proxy#authenticate are to be passive auth checks and should not throw. I'm not sure if this is a problem with the implementation of the Strategy or with the implementation of Warden::Proxy#run_strategies_for. I notice that the Strategies wiki does not mention using throw :warden but the Failures wiki does. The documentation on Warden::Strategies::Base is ambigious.

@ghost
Copy link
Author

ghost commented Apr 12, 2022

See also wardencommunity/warden#203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants