-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
QR code links should be accessible without login to datalab, with read-only access. Probably will need the following approach:
- datalab API stores a new kind of secret key to authenticated users that is infrequently rotated (perhaps just on server startup), with each one stored in the database.
- when generating QR code links, the app gets the latest secret key and encodes it as a token in the generated QR code link, along with the refcode and user in question.
- When visiting the link, the API gives access based on whether the token was once generated by datalab for that entry.
This is a bit insecure; a logged-in user as the key will be visible in network requests and could craft links for other entries, but perhaps this is functionality we want anyway wrt magic links! The only difference will be that the QRCode will be speicifcally encoded as a JWT with no baked-in expiry date.
Another issue is that JWTs might be too large to stuff into QR codes
cc @PeterKraus
Metadata
Metadata
Assignees
Labels
No labels