core-bundle/src/Security/TwoFactor/Authenticator.php
public function getProvisionUri(User $user, Request $request): string
    {
        $issuer = rawurlencode($request->getSchemeAndHttpHost());

        return sprintf(
                'otpauth://totp/%s:%s?secret=%s&issuer=%s',
                $issuer,
                rawurlencode($user->getUsername()).'@'.$issuer,
                $this->getUpperUnpaddedSecretForUser($user),
                $issuer
        );
    }
public function getProvisionUri(User $user, Request $request): string
    {
        $issuer = rawurlencode($request->getSchemeAndHttpHost());

        return sprintf(
                'otpauth://totp/%s:%s?secret=%s&issuer=%s',
                $issuer,
                rawurlencode($user->getUsername()).'@'.$issuer,
                $this->getUpperUnpaddedSecretForUser($user),
                $issuer
        );
    }
Generates the TOTP provision URI.