}
$hash = $this->generateOathKey();
- print_r($hash);exit;
+
$_SESSION[__CLASS__] =
isset($_SESSION[__CLASS__]) ?
$_SESSION[__CLASS__] : array();
$roo->jerr('Fail to generate QR Code');
}
- $roo->jok($qrcode);
+ $roo->jdata(array(
+ 'secret' => $hash,
+ 'image' => $qrcode
+ ));
}
if(!empty($q['two_factor_auth_code'])) {