mcordell / grape_token_auth

Token auth for grape apps
MIT License
52 stars 19 forks source link

Fix sign-out on Rails #45

Closed qd3v closed 8 years ago

qd3v commented 8 years ago

Rails prepends 'CLIENT' header with 'HTTP_' prefix. But we use 'CLIENT' env key to delete token from User.tokens.

Replaced with normalized header name.

More info:

http://stackoverflow.com/q/26936318/1592582 https://github.com/rails/rails/blob/4-2-stable/actionpack/lib/action_dispatch/http/headers.rb#L87-L96

mcordell commented 8 years ago

This looks good, thank you.