TanStack Router: Authenticated Routes (Guards)

Publié le: 12 mars 2024
sur la chaîne: Dev Leonardo
27,141
502

Exploring TanStack Router on a React project to learn the core features of this new typesafe router, together.

Today we'll see how you can protect some routes with guards, allowing only authenticated users to see them, or redirect them to the login page.

Source code: https://github.com/Balastrong/tanstac...

TanStack Start Tutorial:    • TanStack Start Tutorial  
_______________________________
Support my work: https://github.com/sponsors/Balastrong

Hit like and subscribe for more content! :D

Beginner-Friendly Open Source Projects: https://github.com/DevLeonardoCommunity
Join the Discord community! Here's the invite:   / discord  

You can also follow me on the other platforms:
Twitter:   / balastrong  
dev.to: https://dev.to/balastrong
Home: https://leonardomontini.dev/
TikTok:   / balastrong  
GitHub: https://github.com/Balastrong
Instagram:   / devbalastrong  
_______________________________
TIMESTAMPS

00:00 Overview
00:18 Login route
01:00 Define the guard and redirect
02:22 Using a react hook
06:03 Protect multiple routes
07:12 Hide authenticated from the URL
08:22 Organized and controlled routes

#tanstack #router #reactrouter


Sur cette page du site, vous pouvez voir la vidéo en ligne TanStack Router: Authenticated Routes (Guards) durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Dev Leonardo 12 mars 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 27,141 fois et il a aimé 502 téléspectateurs. Bon visionnage!