Code Monkey home page Code Monkey logo

Comments (10)

wstrange avatar wstrange commented on May 22, 2024

@emcrisostomo Thoughts?

from googleauth.

jasonab avatar jasonab commented on May 22, 2024

If a PR would be accepted for this, I'd be happy to submit one.

from googleauth.

emcrisostomo avatar emcrisostomo commented on May 22, 2024

Hi @jasonab, thanks for the suggestion. I'll have a look at it ASAP. If you wish to send a PR, please do.

from googleauth.

emcrisostomo avatar emcrisostomo commented on May 22, 2024

Hi @jasonab, I've quickly checked the PR #61. The problem is not that simple. Actually, there currently is a bug. The URL generation works only if the current configuration is the default. If you customise the GoogleAuthenticatorConfig, then you'll get a wrong URL. That's because you need the following information to build the URL:

  • key
  • number of digis (default: 6)
  • algorithm (default: SHA1)
  • period (default: 30)

Hence I will refactor the library in order to:

  • Deprecate the current method, and specify that it will only work for the default TOTP configuration.
  • Add a method that takes all that information (presumably in the form of a key and a GoogleAuthenticatorConfig instance).

If you are using the default settings and do not need to store the configuration, you will just build a default configuration object.

from googleauth.

jasonab avatar jasonab commented on May 22, 2024

Very good, thanks for your feedback.

from googleauth.

emcrisostomo avatar emcrisostomo commented on May 22, 2024

Released in 1.1.3.

from googleauth.

jasonab avatar jasonab commented on May 22, 2024

Thanks very much for taking care of this, I really appreciate the responsiveness. We'll be integrating with the new version over the next couple of weeks, and I'll file new issues if we have any problems.

from googleauth.

jasonab avatar jasonab commented on May 22, 2024

@emcrisostomo Thanks again for the change, but I think I'm a little confused. My original need here was to take a persisted secret and recreate the URL. The new methods take a GoogleAuthenticatorKey with an embedded config, but I still have no way to construct a GoogleAuthenticatorKey other than calling createCredentials().

In one of your earlier replies, you mentioned adding a method that takes the raw key with a config object, which would work fine for me, but I do not see that method in the latest version.

from googleauth.

emcrisostomo avatar emcrisostomo commented on May 22, 2024

Hi @jasonab, you're right. Haste makes waste. Sort of...

from googleauth.

emcrisostomo avatar emcrisostomo commented on May 22, 2024

Released in 1.1.4

from googleauth.

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.