Adding devise_token_auth to an existing Rails app

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 #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

Freelance software developer Ruby On Rails (4 years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles