Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/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.
https://github.com/dharejo-junaid/graphql-auth
apollo-server docker expressjs graphql graphql-api jsonwebtoken mongoose nodejs
Last synced: about 1 month ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/dharejo-junaid/graphql-auth
- Owner: Dharejo-Junaid
- Created: 2023-10-15T18:31:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-16T15:34:22.000Z (about 1 year ago)
- Last Synced: 2024-09-29T11:25:41.931Z (about 2 months ago)
- Topics: apollo-server, docker, expressjs, graphql, graphql-api, jsonwebtoken, mongoose, nodejs
- Language: JavaScript
- Homepage:
- Size: 92.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 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:
```bash
git clone https://github.com/Dharejo-Junaid/graphql-auth
```2. Install dependencies using npm:
```bash
npm install
```3. create a ".env" file:
- PORT=5000
- JWT_SECRET="xxxxxxxxxxx"
- MONGO_URI="mongodb://localhost:27017/auth"
- EMAIL="[email protected]" (required)
- EMAIL_PASS="xxxxxxxxxxxxxxxxxxxxxxx" (required)4. Start server on port 5000 using:
```bash
npm start
```5. open your browser and type:
```bash
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