Giter Club home page Giter Club logo

auth_api's Introduction

Auth API

Introduction

Auth API is an API that allow authenticated users to access their profile.

Project Support Features

  • Users can signup and login to their accounts
  • Users can see their account information
  • Only the admin can see all users

Installation Guide

  • Clone this repository here.
  • Run yarn to install all dependencies
  • You can either work with the default database or use your locally installed MongoDB. Do configure to your choice.
  • Create a .env file in your project root and add your variables as seen in the .env.example file.

Usage

  • Run docker-compose up -d to spin up your mongodb and redis database.
  • Run yarn start to start the application.
  • Connect to the API using Postman on port 8000.
  • The API documentation is at /api-docs

API Endpoints

HTTP Verbs Endpoints Action
POST /api/auth/register To register a new user account
POST /api/auth/login To login an existing user
GET /api/auth/logout To logout the current user
GET /api/users/me To get the profile of the current user
GET /api/users To retrieve all users (only role admin can do this)
  • To get the admin role, create a new user and change the role from your database to admin.

Technologies Used

Authors

License

This project is available for use under the MIT License.

auth_api's People

Contributors

timmy-id avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.