https://github.com/openscript/react-router-private-protected-routes
Private or protected routes with React Router Dom
https://github.com/openscript/react-router-private-protected-routes
react react-router react-router-dom
Last synced: 2 months ago
JSON representation
Private or protected routes with React Router Dom
- Host: GitHub
- URL: https://github.com/openscript/react-router-private-protected-routes
- Owner: openscript
- Created: 2021-01-15T20:18:54.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-30T21:49:00.000Z (over 3 years ago)
- Last Synced: 2025-02-28T19:38:14.947Z (3 months ago)
- Topics: react, react-router, react-router-dom
- Language: Dockerfile
- Homepage:
- Size: 740 KB
- Stars: 39
- Watchers: 3
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Router private or protected routes
This is an example to implement private or protected routes with redirection after successful authentication to the previously requested path.
- [React Router v5 example (separate branch)](https://github.com/openscript/react-router-private-protected-routes/tree/react-router-5)
- [React Router v6 example (separate branch)](https://github.com/openscript/react-router-private-protected-routes/tree/react-router-6)