lp:canonical-identity-provider

Get this repository:
git clone https://git.qastaging.paddev.net/canonical-identity-provider
Members of Ubuntu One PQM Team can upload to this repository. Log in for directions.

Branches

Name Last Modified Last Commit
master 2024-04-30 13:08:27 UTC
Add QR code generation

Author: Shane M. Pelletier
Author Date: 2024-04-30 13:08:27 UTC

Add QR code generation

Previously, we relied on a third-party API provided by Google to
generate the QR codes used to setup a 2FA application. This API has been
disabled, so we are left with two options: we either switch to another
API provider (and there seems to be no QR code generation API provided
by a well-known source, so we'd have to rely on an unknown party to
provide an API which at best may or may not work and at worst generates
malicious QR codes) or we generate our own QR codes.

Thankfully, there exists a popular and relatively well-maintained Python
library for QR code generation, so it's relatively straightforward to
generate the QR code ourselves and use a data: URL to return the
generated QR code to the browser. This way, we don't even have to store
any temporary files -- the PNG is kept entirely in memory, and only for
the duration of the qrcode_url() function.

Solves https://bugs.launchpad.net/canonical-identity-provider/+bug/2063089
Closes https://warthogs.atlassian.net/browse/SN-2837

Merged from https://code.launchpad.net/~shanepelletier/canonical-identity-provider/+git/canonical-identity-provider/+merge/464923

11 of 1 result
This repository contains Public information 
Everyone can see this information.