Dharejo-Junaid / graphql-auth

This repo contains full authentication system implemented using graphql in backend. It seamlessly integrates user authentication features within a GraphQL API, providing a secure foundation for your web applications. This project is also dockerized.

Repository from Github https://github.comDharejo-Junaid/graphql-authRepository from Github https://github.comDharejo-Junaid/graphql-auth

GraphQL Logo

graphql-auth

This repo contains full authentication system implemented using graphql in backend. It seamlessly integrates user authentication features within a GraphQL API, providing a secure foundation for your web applications.

Getting Started

Prerequisites

  • Node.js and npm installed on your system
  • MongoDB installed locally or a cloud-based MongoDB service

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/Dharejo-Junaid/graphql-auth
  1. Install dependencies using npm:
npm install
  1. create a ".env" file:
  • PORT=5000
  • JWT_SECRET="xxxxxxxxxxx"
  • MONGO_URI="mongodb://localhost:27017/auth"
  • EMAIL="xxxxxxxxxx@gmail.com" (required)
  • EMAIL_PASS="xxxxxxxxxxxxxxxxxxxxxxx" (required)
  1. Start server on port 5000 using:
npm start
  1. open your browser and type:
http://localhost:5000/graphql

API Endpoints

Queries:

  1. login
  2. users (This is protected. To access this you need to create an account and verify it);
  3. user (This is protected as well. So same goes for this);

Mutations:

  1. Signup
  2. Verify

About

This repo contains full authentication system implemented using graphql in backend. It seamlessly integrates user authentication features within a GraphQL API, providing a secure foundation for your web applications. This project is also dockerized.


Languages

Language:JavaScript 97.8%Language:Dockerfile 2.2%