born05 / craft-twofactorauthentication

Craft plugin for two-factor or two-step login using Time Based OTP.
MIT License
36 stars 26 forks source link

Rename 2fa in Google auth #58

Closed billymedia closed 2 years ago

billymedia commented 2 years ago

How do you set the label name in the google authenticator app? When i scan the qr code, it sets the code number label to "Craft CMS (email@email.com)" Can i change this to the company name?

roelvanhintum commented 2 years ago

@billymedia, this should be done using the general Craft CMS settings. Which versions are you using?

roelvanhintum commented 2 years ago

Correction: the email should be the user’s email.

billymedia commented 2 years ago

Craft 4.0.3 Plugin 3.0.0-beta.1

I have craft named under Settings > General as the clients name, but it labelled it as Craft CMS in google auth app, is there another settings somewhere i need to change?

billymedia commented 2 years ago

@roelvanhintum similar issue here https://github.com/born05/craft-twofactorauthentication/issues/60

The reason is that in services/Verify.php on line 155, the issuer is being set to Craft::$app->name whereas it should be set to Craft::$app->sites->currentSite->name

roelvanhintum commented 2 years ago

@billymedia user accounts and 2fa are system wide, not limited to one site. The line should be Craft::$app->getSystemName()

roelvanhintum commented 2 years ago

Fixed in 3.0.0