bullet-train-co / bullet_train

The Open Source Ruby on Rails SaaS Template
MIT License
1.58k stars 244 forks source link

Docs for MFA seem to be incomplete #1555

Closed jagthedrummer closed 1 week ago

jagthedrummer commented 1 week ago

I followed these directions: https://bullettrain.co/docs/authentication#enabling-two-factor-authentication-2fa

But I'm still not seeing any way to enable MFA for my account. Seems like more needs to be done (and documented).

jagthedrummer commented 1 week ago

After reading the devise-two-factor docs I tried doing bin/rails db:encryption:init. This spit out some output like this:

Add this entry to the credentials of the target environment:

active_record_encryption:
  primary_key: NLngkt...
  deterministic_key: edpu...
  key_derivation_salt: Bfwy...

So then I ran bin/rails credentials:edit --environment development which opened the decrypted version of config/credentials/development.yml.enc in my editor.

I pasted in the active_record_encryption block from the previous command, saved, and quit the editor.

Then I restarted my development server and now I see an option to enable 2FA on my account setting page. The link for it doesn't work because it relies on global jquery. 😞

CleanShot 2024-06-20 at 14 12 57