mcordell / grape_devise_token_auth

Grape compatibility for devise_token_auth + devise + rails setup
MIT License
41 stars 29 forks source link

Can't log out #15

Open nachokb opened 7 years ago

nachokb commented 7 years ago

I'm trying to use grape_devise_token_auth in an existing Rails + Devise app[1].

I don't want to use devise_token_auth's session controller b/c I need my API to have these endpoints. No API endpoints outside Grape.

My current problem is with logout. I reset the token on the resource, make warden log it out, but then it complains because AuthHeaders tries to access the user, and afterwards that user's no-longer-existing token (for a given client). Basically what I'm not seeing is something like #skip_auth_headers.

Maybe I'm missing something big, but is there any way to force it to skip?

[1] grape_token_auth is not good for this because it breaks, in a way I can't totally understand, the app's authentication using devise (first it changed some validations on my user model, then Devise complained about not having any strategy to authenticate and I stopped looking). Also, gta's session api is not well described to use with swagger.