Skip to content

JWT Authentication application developed using .Net Core and React

Notifications You must be signed in to change notification settings

muhammetcagatay/jwt-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

JWT Authentication


Table of Contents
  1. About The Project
  2. Built With
  3. Installation

🔰 About The Project

ReactApp.mp4

The main idea of ​​creating this project is to create JWT Authentication system using .Net Core and React technologies.

  • When the application is run, the client makes a request to the server with email and password information. If the email and password information is correct, access token and refresh token are returned to the client.
  • It makes a request to an enpoint that is authorized on the server along with the client access token. If the access token is correct, the information is responded to the client.
  • In case the access token expires, the client makes a request to the server with a refresh token and the server returns a new access token in return.

🔨 Requirements

Technologies needed to get the project up and running

🔌 Installation

Follow the steps below to run the project in your local

  1. Clone the repo

    git clone https://github.com/muhammetcagatay/jwt-authentication.git
  2. Create SQL Server Docker container

    docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=password123*" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
  3. Go to project folder

    cd jwt-authentication/api
  4. Restore and run api

    dotnet restore
    dotnet run
  5. Open new terminal and install npm packages

    cd client
    npm install
  6. Run Client

    npm start

🌎 Endpoints

Listening and serving API Gateway HTTPS on : 5001

Method URL Description
POST /api/auth/login Returns of Access Token and Refresh Token
POST /api/auth/refreshToken Returns of new Access Token and Refresh Token
GET - Authorize /api/home Returns the "Giriş Başarılı" message

About

JWT Authentication application developed using .Net Core and React

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published