You are here

protected function GALoginTotpSetup::getQrCodeUri in Google Authenticator login 8

Get a base64 qrcode image uri of seed.

Return value

string QR-code uri.

1 call to GALoginTotpSetup::getQrCodeUri()
GALoginTotpSetup::getSetupForm in src/Plugin/TfaSetup/GALoginTotpSetup.php
Get the setup form for the validation method.

File

src/Plugin/TfaSetup/GALoginTotpSetup.php, line 145

Class

GALoginTotpSetup
TOTP setup class to setup TOTP validation.

Namespace

Drupal\ga_login\Plugin\TfaSetup

Code

protected function getQrCodeUri() {
  return (new QRCode())
    ->render('otpauth://totp/' . $this
    ->accountName() . '?secret=' . $this->seed . '&issuer=' . urlencode($this->issuer));
}