private async Task CreateTwoFactorCode() { try { if (TwoFactorAuth == null) { throw new Exception("Service not available"); } Secret = TwoFactorAuth.GetSecret(); BackupCode = TwoFactorAuth.GetBackupCode(); string qrcode = TwoFactorAuth.GetQRCodeURL(Secret, "PwdCrypter", "YOUR_NAME"); BindingContext = new { QRCodeUrl = qrcode, Secret, BackupCode }; } catch (Exception ex) { await DisplayAlert(App.Title, string.Format(AppResources.errTwoFactorConfig, ex.Message), "Ok"); } }