Route authenticated users #31
Labels
duplicate
This issue or pull request already exists
enhancement
New feature or request
low priority
This issue is not critical and can be addressed at a later time
In Main.jsx, I have added a function called onAuthStateChanged().
If the user is authenticated, route them to the home page (create a boilerplate), otherwise they will be routed to the sign-in page.
If the user is not authenticated and tries to access pages other than the sign-in and sign-up pages, re-routed them to the sign-in page.
If the user is authenticated and tries to access the sign-in or sign-up page, re-routed them to the home page.
The text was updated successfully, but these errors were encountered: