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

Maybe add a filter hook for the TOTP QR code URL #443

Closed
roytanck opened this issue May 23, 2022 · 3 comments · Fixed by #487
Closed

Maybe add a filter hook for the TOTP QR code URL #443

roytanck opened this issue May 23, 2022 · 3 comments · Fixed by #487
Labels
TOTP Time-based One-time Passwords
Milestone

Comments

@roytanck
Copy link

I'm evaluating this plugin for use in my client's projects. Unfortunately, generating QR codes using googleapis is a hard no-go for them. Having a filter hook in get_google_qr_code would allow me to use a local QR generator instead.

Adding a filter hook in that function should be pretty straightforward, and I don't think it would introduce any other issues?

@kasparsd
Copy link
Collaborator

@roytanck I can totally relate to that concern. It would be great to replace it with a local QR generator as discussed in #42. There is an attempt to fix this in #388 but the changeset appear to be pretty large.

I won't mark this as duplicate of #42 since this asks for a filter instead of removing the external dependency completely.

@kasparsd kasparsd added TOTP Time-based One-time Passwords enhancement labels May 23, 2022
@roytanck
Copy link
Author

Yes, adding a PHP QR generator will likely introduce a lot of code. That's why I proposed a hook, so it can be done in an add-on plugin (one of which I already have to enforce 2FA and remove soem methods my client doesn't need).

I imagine that such a hook could remain in place, even if a local generator is implemented later.

@iandunn
Copy link
Member

iandunn commented Nov 8, 2022

#487 replaced the Google generator with a local one, so there's no longer an external URL to filter.

There are the existing two_factor_totp_title and the new two_factor_totp_url filters though, to customize the locally-generated code.

@jeffpaul jeffpaul added this to the 0.8.0 milestone Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TOTP Time-based One-time Passwords
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants