Adding devise_token_auth to an existing Rails app
19-Jul-2019 2105
Ruby on rails is still the frontrunner for getting an MVP(minimum viable product) out of the door. Eventual when things go our way we want to introduce F/E framework on the customer facing side for various reasons(continue using the admin part as traditional rails app). If you are already using devise and wondering how to use it for api calls this post is for you.The devise_token_auth is a gem on top of devise which works with tokens and leverages on devise. We can even configure it to either refresh the token for every single request or not.Without further delay let’s jump in.Add the following to your Gemfile. We need rack-cors to get support for Cross-Origin Resource Sharing (CORS).
Adding devise_token_auth to an existing Rails app #ruby #rubydeveloper #rubyonrails #Adding #devise_token_auth #existing #Rails #devise_token_auth https://rubyonrails.ba/link/adding-devise_token_auth-to-an-existing-rails-app