Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.

Latest commit

 

History

History
65 lines (43 loc) · 1.19 KB

README.md

File metadata and controls

65 lines (43 loc) · 1.19 KB

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