Skip to content

Commit

Permalink
Update the instruction of enables two-factor-backupable on README
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-ipcoin authored and baseballlover723 committed Sep 1, 2021
1 parent a41ab9a commit 509519b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ Rails.application.config.filter_parameters += [:otp_attempt]
## Backup Codes
Devise-Two-Factor is designed with extensibility in mind. One such extension, `TwoFactorBackupable`, is included and serves as a good example of how to extend this gem. This plugin allows you to add the ability to generate single-use backup codes for a user, which they may use to bypass two-factor authentication, in the event that they lose access to their device.

To install it, you need to add the `:two_factor_backupable` directive to your model.
To install it, you either add the `:two_factor_backupable` directive to your model

```ruby
devise :two_factor_backupable
```

You'll also be required to enable the `:two_factor_backupable` strategy, by adding the following line to your Warden config in your Devise initializer, substituting :user for the name of your Devise scope.
or by adding the following line to your Warden config in your Devise initializer, substituting :user for the name of your Devise scope.

```ruby
manager.default_strategies(:scope => :user).unshift :two_factor_backupable
Expand Down

0 comments on commit 509519b

Please sign in to comment.