Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

NO_VALID_ANSWER #14

Open
tylermenezes opened this issue Apr 20, 2015 · 3 comments
Open

NO_VALID_ANSWER #14

tylermenezes opened this issue Apr 20, 2015 · 3 comments

Comments

@tylermenezes
Copy link

This library doesn't seem to work for me -- it always returns "NO_VALID_ANSWER" no matter what.

In fact, it's not just me -- your own demo page doesn't work: https://demo.yubico.com/php-yubico/demo.php

@NiklasBr
Copy link

It is currently working. Try changing the OTP to a real Yubikey OTP string.

NO_VALID_ANSWER seems to be the response when it is not a password replay nor a valid OTP.

@charlesshoults
Copy link

I too am having issues with no valid answer. I have an API key (clientId, secretKey) and am taking otp as an input variable, but it doesn't seem to be working. I assumed that the ID and secret was added in place of the 24 and FOOBAR, as shown below.

require_once 'assets/scripts/Auth_Yubico-2.6/Yubico.php';
if(isset($_GET["otp"])) {
$clientId = "24";
$secretKey = "FOOBAR=";
$otp = $_GET['otp'];
$yubi = new Auth_Yubico(clientId, secretKey);
$auth = $yubi->verify($otp);

    if (PEAR::isError($auth)) {
            print "<p>Authentication failed: " . $auth->getMessage();
            print "<p>Debug output from server: " . $yubi->getLastResponse();
    } else {
            print "<p>You are authenticated!";
    }

}

Authentication failed: NO_VALID_ANSWER

Debug output from server:

@charlesshoults
Copy link

I figured out my issue. On the line where I'm referring to the previously set clientId and secretKey, I need to have a $ for the variable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants