2.2.3 • Published 2 years ago

@livemarketplace/api-plugin-authentication v2.2.3

Weekly downloads
-
License
GNU GPL v3
Repository
-
Last release
2 years ago

api-plugin-authentication

npm (scoped) CircleCI semantic-release

Summary

This plugin provides Authentication middleware for the Reaction API.

Utils included in this plugin help connect the Account-js library and the Reaction API via an Auth Token.

How it works

This plugin registers the schema and resolvers that are required by account-js.

Whenever a header with name Authorization is present in the request, this plugin uses account-js to get the user for that token. Then the user is attached to the req object.

Also on each request, accountsGraphQL.context is called so that it can pass the user to the "internal context" of account-js.

Supported actions

  1. Signup
  2. Login
  3. Change Password
  4. Forgot Password - A email is sent with a reset token url of the form https://<storefront-url>/?resetToken=<token>

License

Livematketplace has customised, the base code of reaction plugin, which are very specific to 24com business requirements and are licenced under the holding company. Reaction plugin is GNU GPLv3 Licensed. Any reproduce or copy of this code needs prior approval.