Token authenticatable was removed #2616

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

Comments

Projects
None yet
3 participants
@holoiii

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

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby Sep 7, 2013

Collaborator

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

Collaborator

nashby commented Sep 7, 2013

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

@nashby nashby closed this Sep 7, 2013

@raxityo

This comment has been minimized.

Show comment
Hide comment
@raxityo

raxityo Sep 14, 2013

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

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

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby Sep 14, 2013

Collaborator

@geekrax there is before_save callback in User model

Collaborator

nashby commented Sep 14, 2013

@geekrax there is before_save callback in User model

@raxityo

This comment has been minimized.

Show comment
Hide comment
@raxityo

raxityo 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.

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

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby Sep 14, 2013

Collaborator

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

Collaborator

nashby commented Sep 14, 2013

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

@raxityo

This comment has been minimized.

Show comment
Hide comment
@raxityo

raxityo Sep 14, 2013

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

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