Browser and Node.js libraries for third-party authentication with plug.dj
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
packages
.gitignore
.travis.yml
LICENSE
README.md
gulpfile.js
package-lock.json
package.json
version.js

README.md

plug-auth

JavaScript libraries for third-party authentication with plug.dj.

On the client

plug-auth-client

On the server

plug-auth-server

How it works

plug-auth works by verifying that a user has access to the account they claim to be.

  1. plug-auth gives the user a unique token
  2. the user changes their profile blurb (bio) to include the token value
  3. plug-auth checks that the user's blurb includes the token value
  4. plug-auth grants access and generates a JSON Web Token that can be used to verify the user's identity again later
  5. the user changes their blurb back

Building

The client and server packages are both maintained in a single repo (this one). You can build them both by:

npm run build

Testing

plug-auth uses ava for tests and standard for linting.

To run tests:

npm run ava

To lint:

npm run lint

To do both:

npm test

License

MIT