Devise Authentication Token

Posted on 07 Oct 2011 by Eric Oestrich

I started using the devise authentication token for a project recently and was confounded on how to get the token from the client's perspective. After fiddling with different ways, I finally found that adding :authenticationtoken to attraccessible let's it slide through the post to sign_in.

class User
  attr_accessible :authentication_token

    curl -d "user[email][password]=password"

comments powered by Disqus
Eric Oestrich
I am:
All posts
Creative Commons License
This site's content is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License unless otherwise specified. Code on this site is licensed under the MIT License unless otherwise specified.