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

QR Code Helper Functions #230

Open
aletya opened this issue Oct 20, 2024 · 0 comments
Open

QR Code Helper Functions #230

aletya opened this issue Oct 20, 2024 · 0 comments
Assignees

Comments

@aletya
Copy link
Contributor

aletya commented Oct 20, 2024

  • generateUserQR(userId: string) : string
    • Given userId, generate a QR code of format “<uuid>|<expiry>|<signature>”
    • the hashing algorithm to get the signature is up to the implementer
  • decodeUserQR(userId:string) : string
    • Given a custom QR string, return the userId
    • If the signature is invalid, throw an error
    • If the QR is expired, throw an error
    • otherwise, return the userId

Note that this description may not be comprehensive

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