-
-
Notifications
You must be signed in to change notification settings - Fork 458
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
Cookie not persisting in api only application after updating the gem to 2.3.1 #937
Comments
Hi @mohanhari , thanks for opening this issue. I don't think I'm getting a clear understanding of what's not working, could you provide some more information on how to reproduce this? |
HI @MottiniMauro, Create a rails API only application and install clearance gem. After logging in the cookie should be stored and retrieved for other requests. Before clearance version 2.3.1 this was working fine. But when I update the clearance version 2.3.1, after login in the cookie is created but it's not retrieving for other requests. I saw that you added an option for a signed cookie in the latest release, could that be the problem?. It can also be reproduced in RSpec request spec. |
After checking this it looks like clearance is not meant to work with rails API mode out of the box, so it really depends on what you built on top of it. I would recommend checking our wiki for some suggestions on how to do API authentication |
@MottiniMauro Previous versions of clearance supported the Rails API mode with cookie-based authentication instead of token-based authentication. So what changed now that makes the new version not supporting the cookie-based authentication in Rails API mode. |
In the rails API only application the cookie is saving in the browser and also in RSpec after updating the gem version to 2.3.1. It's working good in 2.3.0 or the previous version. Do you guys know what could be the problem?
The text was updated successfully, but these errors were encountered: