GithubHelp home page GithubHelp logo

Demo Always fails. about twofactorauth HOT 9 CLOSED

robthree avatar robthree commented on May 12, 2024
Demo Always fails.

from twofactorauth.

Comments (9)

toddmcbrearty avatar toddmcbrearty commented on May 12, 2024

I believe i found the problem.
In the demo you have

($tfa->verifyCode($secret, $code) === true)

verifyCode function returns 0 or 1 so that would obviously fail is it's not exactly equal to true.
You can either change === to == or i think it's better to return verifyCode as a bool

return (bool) result

from twofactorauth.

RobThree avatar RobThree commented on May 12, 2024

Was just looking into it; verifyCode should return a bool. Will fix in a few minutes.

from twofactorauth.

toddmcbrearty avatar toddmcbrearty commented on May 12, 2024

great! thanks.

from twofactorauth.

toddmcbrearty avatar toddmcbrearty commented on May 12, 2024

if it's easier for you i can do a pull request

from twofactorauth.

RobThree avatar RobThree commented on May 12, 2024

e837caa 😁

I've also created a new release.

Thanks for reporting it! 👍

from twofactorauth.

DanieleSassoli avatar DanieleSassoli commented on May 12, 2024

Hi, this got me confused this morning, luckly I saw this issue... I installed the package from composer (composer require robthree/twofactorauth) and it installed version 1.1, I tried telling composer to install version 1.2(which fixes this issue), with composer require robthree/twofactorauth:1.2 but composer stated that it coulnd't find any versione with that The requested package robthree/twofactorauth 1.2 could not be found.. I can't see what I'm doing wrong so maybe there's some sort of problem with the release...

from twofactorauth.

RobThree avatar RobThree commented on May 12, 2024

Whoops... forgot to update composer.json. I have created a new release 1.3 which should work (probably should've been a minor 1.2.1 or something but what the hell... 😜 )

from twofactorauth.

DanieleSassoli avatar DanieleSassoli commented on May 12, 2024

yep, fixed, thank you...

from twofactorauth.

RobThree avatar RobThree commented on May 12, 2024

👍

from twofactorauth.

Related Issues (20)

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.