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

Token authenticatable was removed #2616

Closed
holoiii opened this issue Sep 7, 2013 · 6 comments
Closed

Token authenticatable was removed #2616

holoiii opened this issue Sep 7, 2013 · 6 comments

Comments

@holoiii
Copy link

holoiii commented Sep 7, 2013

I was just wondering why token authenticatable was removed? I was hoping to use it to build out a token authentication system for an API.

@nashby
Copy link
Collaborator

nashby commented Sep 7, 2013

@holoiii you can find more info in this blog post.

@nashby nashby closed this as completed Sep 7, 2013
@raxityo
Copy link

raxityo commented Sep 14, 2013

@nashby :
In the gist by @josevalim , user.authentication_token is used, but when do we store this authentication_token in database ?

@nashby
Copy link
Collaborator

nashby commented Sep 14, 2013

@geekrax there is before_save callback in User model

@raxityo
Copy link

raxityo commented Sep 14, 2013

@nashby , thank you.
As far as I understood,

  • I should create a field authentication_token in my User model
  • Then in before_save I should set something to user.authentication_token ?

What something would be?
Should I replicate token_authenticable functionality from devise 3.0.3 ?

I'm a bit new with rails, I'd be very thankful if you could point me to a right direction.

@nashby
Copy link
Collaborator

nashby commented Sep 14, 2013

@geekrax there is a method in that gist that generates that token

@raxityo
Copy link

raxityo commented Sep 14, 2013

Oo.. I am so sorry, I totally ignored first file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants