In previous post we saw how to buil RESTful API using Grape. In this post we will see how to add devise auth token to users and how to use it in Grape API authentication.
Lets see how this can be done assuming you already have devise setup ready.
Add token_authenticable to devise modules
In user.rb add :token_authenticatable to the list of devise modules, it should look something like below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16