Skip to content

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

Notifications You must be signed in to change notification settings

Relativelie/auth

Repository files navigation

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. These are just dummy mocks

Short video review

  • Get request with the auth bearer token
2024-01-22.11.27.00.mov
  • Refreshing access token if it has responded with 401 code
2024-01-22.11.32.54.mov
  • Auth/registration
2024-01-22.11.19.58.mov
  • Input validation
2024-01-22.11.13.21.mov
  • Show an error message when an error response is received
2024-01-22.12.02.50.mov

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'

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published