shubhamji88 / uniauth-backend

backend service to power uniAuth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Authentico

Build Status Ensure Build

Objective

The detailed objective is available on the /UniAuth repository.


Docs

Running on Local System

Running the project on local system is strongly recommended, even if you are not working on the backend. This is becuase to test the middlewars, client applications, or any other component, an instance of UniAuth OAuth server is required. Make sure that you have a mongodb instance running. This step might be different depending on your installation type. If you do not have mongodb database installed, refer this link

  • Clone the repository to your system using git clone https://github.com/UniAuth/uniauth-backend
  • Now open the cloned repository using cd uniauth-backend
  • The project depends on numerous npm packages. Install them using yarn install or npm install
  • Run yarn start:dev or npm run start:dev to launch a development server.
  • Open localhost:5000 and ensure that the server is running.

Seems a long process? We have an open issue to create a docker image to make this short. Help us out by sending a pr.

Creating an Application

Once you have a server running(use the above steps if not), now you'll need to create a user account and application credentials just like any other user would. The steps are:

  • Open localhost:5000/account/register and fill in your details. Enter any random 9 digit word for registration number. This is added to demonstrate that custom fields can be added during registration itself.
    There are some validations in the system , so kindly follow the following format :
    Format for registration number : [2 digit year][3 character code][4 digit number]
    Example: 19BCE2669, 19MIT0001, 20BTC0010 etc.

Registration page

  • The page will ask you to please check your email for verification link. The email part is not integrated yet. So nothing to be done here. Head towards login and use the email and password you used to register right now.

  • Once logged in, you will see your dashboard. Please note that these are placeholder images only.

  • Head towards "Dev Arena" and click on "New Application"

  • Enter the details of the application and click on "Create Application". Ideally the page must refresh itself, if it doesn't, then manually refresh it. (create issue for this please). Application Details

  • Here you can see the details of the newly created application.

Application Details

  • Now you can use the application details in middlewares and clients.

UniAuth Flow

OAuth Flow

Consent Screen

The user sees the following screen when during login Simple Consent Screen for event

Technologies Used

About

backend service to power uniAuth

License:MIT License


Languages

Language:TypeScript 51.2%Language:Handlebars 45.4%Language:JavaScript 2.8%Language:Dockerfile 0.6%