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

fix: remove qrCodeUri #131

Merged
merged 2 commits into from
Jan 29, 2024
Merged

fix: remove qrCodeUri #131

merged 2 commits into from
Jan 29, 2024

Conversation

horsefacts
Copy link
Collaborator

@horsefacts horsefacts commented Jan 29, 2024

Motivation

The useCreateChannel and useSignIn hooks convert the auth relay connection URL to a QR code and return it encoded as a data URI. However, the underlying library uses the Canvas API and is incompatible with React Native.

AuthKit components don't actually use this internally, instead we use the unencoded url to create a QR code SVG. Although returning this value might be convenient, it probably doesn't belong at the hook level: clients should use a QR code library of their choice to render the url as a scannable code (or use the QRCode component included in AuthKit).

Change Summary

Remove qrCodeUri from the return value of useCreateChannel and useSignIn.
Export QRCode component.

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review

  • PR title adheres to the conventional commits standard
  • PR has a changeset
  • PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore)
  • PR includes documentation if necessary
  • All commits have been signed

@horsefacts horsefacts added the bug label Jan 29, 2024
@horsefacts horsefacts merged commit 7b3a884 into main Jan 29, 2024
3 checks passed
@horsefacts horsefacts deleted the horsefacts/remove-qr-code branch August 19, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant