Giter Site home page Giter Site logo

import 2FAS about 2fauth HOT 5 CLOSED

captainabloc avatar captainabloc commented on May 20, 2024
import 2FAS

from 2fauth.

Comments (5)

Bubka avatar Bubka commented on May 20, 2024

Hi,

It's weird, your export file is missing a property normally available in 2FAs export. Could you open the 2fas file with a text editor and check how are composed the otp objects?
They look like this, except that at least one of them does not contain the algorithm property:

"otp":
{
    "account": "My account",
    "digits": 6,
    "counter": 0,
    "period": 30,
    "algorithm": "SHA1",
    "tokenType": "TOTP"
}

How many don't have the algorithm property? For them, what is their tokenType?

from 2fauth.

captainabloc avatar captainabloc commented on May 20, 2024

Hi,
I have 6 objects. Upon those 6, one only hasn't the algorithm property.
this is the one for ssh totp:

otp{6}
link:otpauth://totp/account?secret=supersecret&issuer=access
label:ssh@access
account:myaccounts
issuer:access
tokenType:TOTP
source:Link

and indeed, this is the only one not having

    "digits": 6,
    "counter": 0,
    "period": 30,
    "algorithm": "SHA1",

infos

from 2fauth.

captainabloc avatar captainabloc commented on May 20, 2024

and nice catch!
removing that one from the file makes it working!

thanks for the trick.

Do you, by chance, know a solution to get that one working too?

from 2fauth.

Bubka avatar Bubka commented on May 20, 2024

This is what I'm currently looking for. For now all the exports I made with 2FAs always had these missing props.

Can you try this:

  • Edit your export and add the following properties to the ssh item:
      "digits": 6,
      "period": 30,
      "algorithm": "SHA1",
    
  • Import to 2FAuth, you shouldn't face any error
  • Generate a code for the ssh account in 2FAuth then compare it to a code generated by 2FAs.

Do you get the same code?
Is there anything special about how this ssh account was registered into 2FAs?

from 2fauth.

captainabloc avatar captainabloc commented on May 20, 2024

you rock!
working perfect now, thanks and congrats for your project.

from 2fauth.

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.