earthstar-project / earthstar

Storage for private, distributed, offline-first applications.
https://earthstar-project.org
GNU Lesser General Public License v3.0
623 stars 18 forks source link

Add utilities and methods for invitation codes #313

Closed sgwilym closed 1 year ago

sgwilym commented 1 year ago

What's the problem you solved?

It is very boring to copy and paste share addresses, secrets, and server URLs in order to onboard someone onto an Earthstar share. Ideally you should be able to share a link which someone only has to click. This requires creating a format which includes all of the above information and which can be embedded within a URL.

What solution are you recommending?

In #36 @cinnamon-bun, @RangerMauve and I workshopped an invitation format. The first version of this format worked quite well, and could be embedded into a browser app's URL so that someone really could just click a link and the app would detect the presence of an invite and do all the work for the user.

But the first version of this code did not support secrets. This branch adds utilities to create and parse a new v2 of this invitation format: