Giter Site home page Giter Site logo

ssb-invite's Introduction

ssb-invite

Invite-token system, mainly used for pubs. Creates invite codes as one of ways of onboarding.

Generally this ends being used for pubs:

  • Users choose a pub from a list of pubs.
  • The chosen pub gives out an invite code to the user via the pub's website.
  • The user installs a Scuttlebutt client and copy and paste the invite code into the client's "accept invite" prompt.
  • The pub validates the invite code and follows back the new user, making them visible to other Scuttlebutt users.

Soon, hopefully supercededed by ssb-peer-invites but supported for backwards compatibity.

api

create: async

Create a new invite code.

create {n} [{note}, {external}]
create(n[, note, external], cb)

This produces an invite-code which encodes the ssb-server instance's public address, and a keypair seed. The keypair seed is used to generate a keypair, which is then used to authenticate a connection with the ssb-server instance. The ssb-server instance will then grant access to the use call.

  • n (number): How many times the invite can be used before it expires.
  • note (string): A note to associate with the invite code. The ssb-server instance will include this note in the follow message that it creates when use is called.
  • external (string): An external hostname to use

accept: async

Use an invite code.

  • invitecode (string)
accept {invitecode}
accept(invitecode, cb)

This connects to the server address encoded in the invite-code, then calls use() on the server. It will cause the server to follow the local user.

use: async

Use an invite code created by this ssb-server instance (advanced function).

use --feed {feedid}
use({ feed: }, cb)

This commands the receiving server to follow the given feed.

An invite-code encodes the ssb-server instance's address, and a keypair seed. The keypair seed must be used to generate a keypair, then authenticate a connection with the ssb-server instance, in order to use this function.

  • feed (feedid): The feed the server should follow.

License

MIT

ssb-invite's People

Contributors

arj03 avatar christianbundy avatar dominictarr avatar mindshade avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.