Comments (3)
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.
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.
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)
- Silence warnings HOT 1
- Login failure HOT 4
- Follow PSR-0/1/2 HOT 1
- DVORAK mangles key IDs HOT 1
- Packagist/Composer Support HOT 1
- Auth_Yubico has a deprecated constructor
- Does this work with PHP 7.2? HOT 4
- Demo Not Working?
- Use of flush() function prevents modification of header HOT 1
- support non-qwerty keyboard layouts HOT 1
- URL not working in the intructions HOT 1
- Predictable Nonce.
- Dangerous Option HOT 2
- add composer support HOT 24
- remove dependency to pear ... as this is not recommend anymore ... HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-yubico.