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

Unify the payload in the QR Code and in the Link's href #19

Open
JaceHensley opened this issue Apr 29, 2021 · 0 comments
Open

Unify the payload in the QR Code and in the Link's href #19

JaceHensley opened this issue Apr 29, 2021 · 0 comments

Comments

@JaceHensley
Copy link
Collaborator

Right now the QR code's payload is the stringified JSON and the link's href contains a base64 encoded payload as a query parameter.

I think it would be better to have both contain the same payload. And if the payload of the QR code is a link then systems could recognize the uri schema and suggest apps that could handle it

Suggestion:

Make the link's href look like:

const data = {
  challengeTokenUrl: 'https://...',
  version: '...'
}
<a href={`waci:${window.btoa(JSON.stringify(data))}`} />

And the payload given to the QR code is the same:

const data = {
  challengeTokenUrl: 'https://...',
  version: '...'
}

<QR data={`waci:${window.btoa(JSON.stringify(data))}`} />

Now if the user scans a WACI QR code with their camera app they could go to the waci link and an app that handles waci requests can be opened.

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

No branches or pull requests

2 participants
@JaceHensley and others