Add better text for the secret

This commit is contained in:
Girish Ramakrishnan
2018-04-26 09:36:09 -07:00
parent 0d58a6bf33
commit 7756c07bc6
+1 -1
View File
@@ -575,7 +575,7 @@ function setTwoFactorAuthenticationSecret(userId, callback) {
if (result.twoFactorAuthenticationEnabled) return callback(new UserError(UserError.ALREADY_EXISTS));
var secret = speakeasy.generateSecret({ name: 'cloudron' });
var secret = speakeasy.generateSecret({ name: `Cloudron (${config.adminFqdn()})` });
userdb.update(userId, { twoFactorAuthenticationSecret: secret.base32, twoFactorAuthenticationEnabled: false }, function (error) {
if (error) return callback(new UserError(UserError.INTERNAL_ERROR, error));