/** * Create a new Authenticator based on a given restore code * provided by another device and its serial. * @param string $serial The serial, same format as serial(). * @param string $restore_code 10 characters restore code * @return Authenticator the requested Authenticator */ public static function restore($serial, $restore_code) { $authenticator = new Authenticator($serial, 'tempsecret'); $authenticator->do_restore($restore_code); return $authenticator; }