Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ENV variable config more clear #213

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ Next, since Devise-Two-Factor encrypts its secrets before storing them in the da

```ruby
devise :two_factor_authenticatable,
:otp_secret_encryption_key => ENV['YOUR_ENCRYPTION_KEY_HERE']
:otp_secret_encryption_key => ENV['YOUR_ENCRYPTION_KEY_ENVIRONMENT_VARIABLE']

```

Finally, you can automate all of the required setup by simply running:

```ruby
rails generate devise_two_factor MODEL ENVIRONMENT_VARIABLE
rails generate devise_two_factor MODEL YOUR_ENCRYPTION_KEY_ENVIRONMENT_VARIABLE
```

Where `MODEL` is the name of the model you wish to add two-factor functionality to (for example `user`), and `ENVIRONMENT_VARIABLE` is the name of the variable you're storing your encryption key in.
Where `MODEL` is the name of the model you wish to add two-factor functionality to (for example `user`), and `YOUR_ENCRYPTION_KEY_ENVIRONMENT_VARIABLE` is the name of the variable you're storing your encryption key in.

This generator will add a few columns to the specified model:

Expand Down