Our great sponsors
-
Devise Token Auth
Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
redux-token-auth
Redux actions and reducers to integrate easily with Devise Token Auth (by kazukinagata)
-
redux-token-auth
Redux actions and reducers to integrate easily with Devise Token Auth (by ziaulrehman40)
redux-token-auth had been a go to choice for many rails devs who started working with standalone frontends in react. But it has been majorly un-maintained, while on the journey of upgrading our front-end stack, this was becoming a blocker as it was locking to older version of redux and react etc, also had security issues. We ended up with a custom clone where we managed to fix as much as we needed.
redux-token-auth is a great library. What it mainly does is it provides a plug and play auth implementation functionality for ruby on rails based APIs which implement popular devise_token_auth for auth handling.
After hours of search and try, we found a relatively healthy clone with a LOT of changes from original one, it felt a bit dangerous but we went through the changes_(I don’t do typescript, but i can understand its code, like someone who doesn’t speak a language but can understand it somewhat when spoken to him )_. (it had all changes in develop and not in master/main, which did caused some confusion and overlooking in start.)
This clone had already done the major parts of our work react and redux dependencies were pinned to latest , we just had to upgrade axios, luckily it didn’t cause any breakage in functionality. Then there were some patches we were using, you can see the commit history on github for our final clone as well, but i will put in a summary here as well, to save you some time.
Related posts
- Managing redirects to a subdomain after authentication in a React/Rails application using React Router
- Is it possible to retrieve the user index with devise ?
- Ruby on Rails: Native route constraint for authentication
- Generate a pre-built authentication system into a rails application
- An Introduction to Devise for Ruby on Rails