Skip to content

Added backup code in registration

David Burke requested to merge 174-backup-code-registration into dev

Related to #174 (closed)

Changes

  • Updated services/reducers to accept generated backup code and place in state
  • Added code to pdf generation
  • Added storybook to demonstrate pdf generation

Things to look at

  • Added 300kb which is basically all jspdf. It seems the most popular/lightweight option however it does not play well with tree shaking. So we get the entire thing instead of just the parts we use :(
  • Is it time for code splitting to reduce initial bundle size? Or other tricks to make it feel fast
  • PDF generation - we make a QR code out of the code, then we place it into a canvas, then we turn the canvas into a png, then place the png into the pdf and set compression to 'FAST' so that it isn't too big. jspdf supports SVG however it's incomplete (proof of concept?). It doesn't seem to work at all with our QR codes.
  • My figma design
    • What do you think of allowing skip?
  • Is it wise to allow the QR code to show up while we haven't even tested reading it yet? Might consider hiding it for now.
  • Review my copy
Edited by David Burke

Merge request reports