Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the result of a spontaneous reaction during a Friday lunch conversation with a friend @indragiek, bouncing ideas on making file sharing between mobile and computer. Copying links is hard and very tedious, users give up trying to copy long links. Sharing to yourself is a no brainer as this is even more difficult. My idea was to quickly link up a file with my device without having to write an app, so this code is an experiment to see how easy it will become. This new feature just needs a drive-server to be running anywhere and then you can direct drive qr to it.
The logic behind it is that to verify that you know this server, an HMAC signature of your private key, public key, generation time, random payload, fileURL and expiry time are performed. The private key is never sent. The public key, payload, fileURL, request time, expiry time and signature are set to the server via browser open. On its side, it performs a similar HMAC and will refuse to generate a QR code if signatures and comparisons don't match up.
Usage is in the README