Skip to content

Latest commit

 

History

History
93 lines (55 loc) · 2.13 KB

readme.md

File metadata and controls

93 lines (55 loc) · 2.13 KB

Auther - Pre-built authentication templates

This a backend with pre-built authentication made using Nodejs and Typescript. Follow the instructions below to clone the repository and run the application.

Current frameworks

image

image

image

image

Frontend

image

image

Prerequisites

Ensure you have the following installed on your system:

Getting Started

Clone the Repository

First, clone the repository using Git:

git  clone  https://github.com/Soumyadas15/auther

Move to project directory

cd auther

Choosing a backend

Move to 'backend' directory

cd backends

After visiting the backends directory, select your preferred framework and follow its documentation.

Running the frontend locally

After running the backend, navigate to the project directory using

cd ..
cd ..

Then navigate to the frontend directory

cd frontend

In the root directory, create a file called .env and paste these and save

API_URL="http://localhost:8080/api"
NEXT_PUBLIC_API_URL="http://localhost:8080/api"

After that, run the command to install dependencies

npm install

And finally run the app using

npm run dev

Visit http://localhost:3000 on your browser to see it running.

Authentication

When a user logs in via the /api/auth/login endpoint, a JWT token is returned. This token is then stored in cookies on the frontend. For every subsequent request, the JWT token is retrieved from the cookies and sent along with the request.