This package has been deprecated

Author message:

WARNING: This project has been renamed to @krypton-org/krypton-auth. Install using @krypton-org/krypton-auth instead.

graphql-auth-service
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

Express authentication middleware, using GraphQL and JSON Web Tokens.

GraphQL Auth Sevice is an authentication middleware for Express handling login, registration, password recovery and account management with GraphQL & JSON Web Tokens.

It is a free & open-source alternative to Firebase Authentication.

  • Documentation — Consult the quick start guide and the online documentation.

Features

  • Authentication based on JSON Web Tokens
  • XSS and CSRF protection
  • Easy to customize the user data model
  • Easy to integrate into web apps & mobile apps
  • Easy to scale
  • Test IDE included for development

Installation

npm install graphql-auth-service --save
# or
yarn add graphql-auth-service

Assuming that you have a MongoDB instance running on mongodb://localhost:27017/users, you can run the following simple example.

const { GraphQLAuthService } = require('graphql-auth-service');
const express = require('express');

const app = express();

// API entry point is localhost:5000/auth
app.use('/auth', GraphQLAuthService());

app.listen(process.env.PORT || 5000, () => {
    console.log(`server is listening on ${process.env.PORT || 5000}`)
})

See the documentation for more details.

Package Sidebar

Install

npm i graphql-auth-service

Weekly Downloads

10

Version

2.2.1

License

MIT

Unpacked Size

179 kB

Total Files

61

Last publish

Collaborators

  • jrebecchi