dannysmith / jimmy

Jimmy is a toy. That's all.
0 stars 0 forks source link

Switch to using Devise for Authentication #130

Open dannysmith opened 6 years ago

dannysmith commented 6 years ago

Devise is pretty standard in the Rails world. It allows us to abstract some of the complexity of handling users and auth to the Gem.

Main advantages are:

It may be better to use Authlogic for simplicity.

Steps:

  1. Check if Authlogic supports 2FA/Twitter/FB etc. Evaluate.
  2. Install Devise
  3. Generate the scaffolding and routes so they are in the codebase not the gem.
  4. Edit these files so they fit in with Jimmy.
  5. Enable login by Twitter / FB / GH and Google.
  6. Enable 2FA somehow.
  7. Clean the whole thing up and write some tests.
  8. Invent some way to authenticate over API (using JWT etc) and to the React components.
dannysmith commented 6 years ago

Opened PR #198 which replaces the custom auth mechanism with Devise. I'm still not convinced that this is the right direction to take, since Devise has a whole lot of magic in it.