DEV Community

Discussion on: Guide to devise_token_auth: Simple Authentication in Rails API

Collapse
 
leesmith profile image
Lee Smith 🍻

You actually can use session cookies for API authentication...as long as the API client is a web browser. Given that caveat, I thought this approach was interesting because it takes advantage of the battle-tested CSRF protection already built into Rails.

pragmaticstudio.com/tutorials/rail...

Collapse
 
risafj profile image
Risa Fujii

Thank you for your comment! Perhaps I should've specified - I meant Rails API with no front-end when I was talking about not being able to use sessions.

Some comments have been hidden by the post's author - find out more