Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for alternative QR library #141

Closed
bluetech opened this issue Apr 16, 2024 · 1 comment · Fixed by #142
Closed

Add support for alternative QR library #141

bluetech opened this issue Apr 16, 2024 · 1 comment · Fixed by #142

Comments

@bluetech
Copy link
Contributor

Problem

django-otp currently optionally depends on the qrcode package for SVG QR image support.
My issue with qrcode is:

Proposed solution

I would like to use a different QR library. I can see two alternatives for doing it:

  1. Replace the qrcode dependency with another library
  2. Add support for a second library as another optional dependency under a separate extra

For me both solutions would fix the issue. The second is less disruptive, but increases the testing matrix.

After looking into the available QR library options, segno looks to me like the best option. It is maintained, pure Python, can generate SVG and has zero dependencies.

If this proposal is accepted, I can send a PR for either option 1 or 2.

@psagers
Copy link
Member

psagers commented Apr 16, 2024

Adding segno support is fine with me. It's a close call, but probably best to minimize disruption. Perhaps we need a qrcode helper somewhere that will look for a compatible library. We could also add django-otp[segno] as a convenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants