Skip to content

yensubldg/react-route-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Route with Authentication

A simple React route with authentication.

Available Routes

  • React Route v6

How does it work?

  • First: it's work when use access route private.
  • Second: it's check if user is authenticated then accept to see private page, otherwise redirect to login page.

How to use it to your project?

  • Configure callback in src/auth/Login.js
  • See example private route in src/App.js