An open API service indexing awesome lists of open source software.

https://github.com/relativelie/auth

react - refresh/access tokens - Router Dom v6. Example of Authentication with an access and refresh token.
https://github.com/relativelie/auth

axios react reacthookform reactrouter6 toastify typescript

Last synced: 11 months ago
JSON representation

react - refresh/access tokens - Router Dom v6. Example of Authentication with an access and refresh token.

Awesome Lists containing this project

README

          

# Authentication Example

## Project Objective

- The purpose of the project is to demonstrate skills in developing authorization systems.
- It's a simple project for now, but I'll make it more complicated over time.

## Technologies Used

react - refresh/access tokens - Router Dom v6 - react-hook-form - react-toastify

## Features

* Authorization and registration
* Sending requests with an access token
* Refreshing token if an access token is not valid
* Email and pass validation

## Backend mocks

Backend mocks are located [here](https://github.com/Relativelie/auth_back). These are just dummy mocks

## Short video review

* Get request with the auth bearer token

https://github.com/Relativelie/auth/assets/59819426/1c7b29cb-fd69-4cf9-938d-3fd84b3cdbf0

* Refreshing access token if it has responded with 401 code

https://github.com/Relativelie/auth/assets/59819426/17244c0b-25c5-42fb-b43c-6f5abce780fc

* Auth/registration

https://github.com/Relativelie/auth/assets/59819426/5628bc39-32f6-4dac-b06a-6e1349d3ea58

* Input validation

https://github.com/Relativelie/auth/assets/59819426/2a9c1b0c-ff4e-4e87-b303-ae84f36c7bb8

* Show an error message when an error response is received

https://github.com/Relativelie/auth/assets/59819426/db58c6a6-5cfa-42f5-bb40-004d49b521a2

## Installation
### Frontend auth:
1. Clone the repository
https://github.com/Relativelie/auth.git

2. Navigate to the project directory
3. Install packages with 'npm install'
4. Start the development server 'npm start'

### Mock server
1. Clone the repository
https://github.com/Relativelie/auth_back.git

2. Navigate to the project directory
3. Install packages with 'npm install'
4. Start the development server ''node auth_mock.js'