Git Product home page Git Product logo

Comments (3)

NiklasBr avatar NiklasBr commented on September 25, 2024

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.

from php-yubico.

charlesshoults avatar charlesshoults commented on September 25, 2024

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:

from php-yubico.

charlesshoults avatar charlesshoults commented on September 25, 2024

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.

from php-yubico.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.