Code Monkey home page Code Monkey logo

Comments (6)

clokep avatar clokep commented on July 20, 2024

How is the secret shown in this case?

I suspect you could override the TwoFactorSetup to include information about the device in the template, I don't think it would be too difficult to encode the key in a different way.

from django-allauth-2fa.

dwasyl avatar dwasyl commented on July 20, 2024

If you look at Github's 2FA setup screen on the page where you view the QR code there is a text link to a modal dialog that pops up with the text version of the secret that can be manually entered into an Authenticator app.

I'm not entirely sure of what change to make in this case - basically the secret that is used to generate the QR code needs to be shared with the context. Presumably it needs to be provided at the same time as the QR code is loaded, although that currently just returns an image.

from django-allauth-2fa.

clokep avatar clokep commented on July 20, 2024

You would likely want it returned in the context of the TwoFactorSetup view.

from django-allauth-2fa.

akx avatar akx commented on July 20, 2024

As an aside, commit 94d12db (in #74) makes it possible to access the secret from the view using the template variable {{ view.device.key }}.

from django-allauth-2fa.

dwasyl avatar dwasyl commented on July 20, 2024

Oh, that would be great - thanks for the heads up @akx. When that gets merged in, it will make life easier to do this. I'd taken crack at it but got pulled away onto other projects as this was just a "nice to have" feature.

from django-allauth-2fa.

dwasyl avatar dwasyl commented on July 20, 2024

Closing because the noted changes made this possible and it's in the current release.

from django-allauth-2fa.

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.