You are here

protected function GALoginHotpSetup::getQrCodeUri in Google Authenticator login 8

Get a base64 qrcode image uri of seed.

Return value

string QR-code uri.

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

File

src/Plugin/TfaSetup/GALoginHotpSetup.php, line 149

Class

GALoginHotpSetup
HOTP setup class to setup HOTP validation.

Namespace

Drupal\ga_login\Plugin\TfaSetup

Code

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