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

Recommended solution to token authentication without fallback to session #323

Open
mwangersjo opened this issue Dec 8, 2017 · 1 comment
Labels
support request This issue is a request for support using Simple Token Authentication.

Comments

@mwangersjo
Copy link

First, thanks for all the work put in to this, it's really appreciated. I'm setting up this for the API part of an app I'm building and have some problems that I've seen being brought up in issues throughout the last couple of years. I'm not entirely sure what the state of this is with the current rails versions and current state of simple token authentication. To sum up, it would be nice to know if there is any solution to this that you recommend.

  • When I log in from the web app part of my rails app and in that way establish a session I am able to access the controllers that are supposed to be protected by token authentication. I can see that there is a session being used.

I've tried to patch together some of the comments from various issues but can't get it to work in a way where the session is not used even though I would like them only to accept tokens for authentication. Sorry if this is a very general question but it feels like there are a lot of threads about this promoting different approaches and I got confused jumping between all of them, especially since some are a couple of years old and promote now obsolete syntax and so on.

@sauy7
Copy link

sauy7 commented Jan 19, 2018

I solved this by stripping cookies from all my API endpoints using this Rack middleware: https://github.com/icoretech/rack-strip-cookies

@gonzalo-bulnes gonzalo-bulnes added the support request This issue is a request for support using Simple Token Authentication. label Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support request This issue is a request for support using Simple Token Authentication.
Projects
None yet
Development

No branches or pull requests

3 participants