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

Generare QR Codes as SVG #97

Merged
merged 6 commits into from
Oct 20, 2024
Merged

Generare QR Codes as SVG #97

merged 6 commits into from
Oct 20, 2024

Conversation

strouptl
Copy link
Collaborator

Description: This Pull Request updates devise otp to generate QR Codes as SVGs via the rqrcode gem. This eliminates any JavaScript or Sprockets dependencies in preparation for importmaps (now the only option for new apps in Rails 8).

Changes:

  • Add rqrcode to Gemspec
  • Update otp_authenticator_token_image helper method to generate QR Code direclty as SVG
  • Remove other QR Code generation methods
  • Remove references to QRCode.js
  • Remove devise-otp.js and assets/javascripts directory (no longer needed)
  • Update README

@strouptl
Copy link
Collaborator Author

Resolves Issue #93

@strouptl
Copy link
Collaborator Author

Additional changes:

  • Add default CSS to reapply a max-width and some centering
  • Update README for changes

@strouptl
Copy link
Collaborator Author

Rebased.

@strouptl
Copy link
Collaborator Author

Note that we would need to direct existing users in the Changelog to remove devise-otp.js from their JavaScript, and add devise-otp.css to their CSS;

@strouptl
Copy link
Collaborator Author

FYI, DHH has announced that no new Rails projects should be started with Sprockets. So, I think we are making this change just in time.

rails/rails#52887

@strzibny
Copy link
Collaborator

It works well for me, thanks, and sorry about the delay.

@strzibny strzibny merged commit 1dd2876 into wmlele:master Oct 20, 2024
4 checks passed
@strouptl strouptl deleted the svg_qr_code branch November 19, 2024 17:23
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 this pull request may close these issues.

2 participants