Get QR Code in external view

42 views
Skip to first unread message

j.rom...@gmail.com

unread,
Mar 5, 2018, 3:51:38 PM3/5/18
to django-otp
Hi, I'm working using TOTP Devices, and I have a view to save a device, but i don't know exactly, how can I do, to redirect to an URL to scan the QR Code with my phone, outside the admin.

Somebody can help me?

Peter Sagerson

unread,
Mar 5, 2018, 4:11:52 PM3/5/18
to djang...@googlegroups.com
There's no trick to it. TOTPDevice has a config_url property,[1] which is the content of the QR Code. You may need two Django views: one for the page and another to generate the QR Code and render it into an image response. Just be very careful with the permissions on these views.

Thanks,
Peter




On Mar 5, 2018, at 12:51 PM, j.rom...@gmail.com wrote:

Hi, I'm working using TOTP Devices, and I have a view to save a device, but i don't know exactly, how can I do, to redirect to an URL to scan the QR Code with my phone, outside the admin.

Somebody can help me?

--
You received this message because you are subscribed to the Google Groups "django-otp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-otp+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

j.rom...@gmail.com

unread,
Mar 5, 2018, 4:17:28 PM3/5/18
to django-otp
Thanks! I gonna read about that to make the change...
Reply all
Reply to author
Forward
0 new messages