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:
createInvitationURL, which creates a valid URL given a share address, server URLs, and optionally a share secret.
parseInvitationURL, which parses a share address, server URLs, and potentially a share secret from an invitation URL.
SharedSettings#redeemInvitationURL, which automatically adds the new share address, servers URLs, and secret to the persisted user settings.
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:
createInvitationURL
, which creates a valid URL given a share address, server URLs, and optionally a share secret.parseInvitationURL
, which parses a share address, server URLs, and potentially a share secret from an invitation URL.SharedSettings#redeemInvitationURL
, which automatically adds the new share address, servers URLs, and secret to the persisted user settings.