Skip to content

The users microservice that is ready to use out of the box as a user authentication and data storage service, or as a starting point for a users part of your next API.

License

Notifications You must be signed in to change notification settings

The-Devoyage/graphql-users

Repository files navigation

@the-devoyage/graphql-users

A Federated GraphQL Users API featuring user creation, management, authentication, and memberships.

Docs

The Devoyage - GraphQL Users

Quick Start

  1. Login to the Github registry with NPM.
npm login --registry=https://npm.pkg.github.com
  1. Install Dependencies
npm install

With Docker:

docker build -t name:tag --build-arg GITHUB_TOKEN="ghp_abcdefgxyzhijklmnop"
  1. Configure Environment Variables

All environment variables are saved in the root of this repo in a file called .env.example. Move this file to .env and fill in the variables.

Start the server:

In Development:

npm run dev

In Production:

npm start

Create an Admin User

To create an admin user you must have access to the mongo database as the system does not create admin users by default. Once you have access to the mongo database, simply change the user's membership role to 1.

db.users.findOneAndUpdate({email: "admin@email.com", "memberships._id": ObjectId("12345")}, {$set: {"memberships.$.role": 1}})

About

The users microservice that is ready to use out of the box as a user authentication and data storage service, or as a starting point for a users part of your next API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages