From 21236609b2642c43b20e662d8bf6cbe95db183e4 Mon Sep 17 00:00:00 2001 From: Edward Simpson Date: Sun, 28 May 2017 23:23:52 -0700 Subject: [PATCH] Doc change re otp_secret_key for version 1 to 2 upgrade Resource attribute otp_secret_key only needs a value if the user requires a TOTP value. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 472414f..73c7cd5 100644 --- a/README.md +++ b/README.md @@ -175,14 +175,15 @@ To add them, generate a migration such as: $ rails g migration AddTwoFactorFieldsToUsers direct_otp:string direct_otp_sent_at:datetime totp_timestamp:timestamp -The `otp_secret_key` is not only required for users who use Google Authentictor, +The `otp_secret_key` is only required for users who use TOTP (Google Authenticator) codes, so unless it has been shared with the user it should be set to `nil`. The following pseudo-code is an example of how this might be done: ```ruby User.find_each do |user| do - if !uses_authentictor_app(user) + if !uses_authenticator_app(user) user.otp_secret_key = nil + user.save! end end ```