fix: Resolve post-login 404 and PublicHome button functionality#3
Merged
fix: Resolve post-login 404 and PublicHome button functionality#3
Conversation
This commit addresses two issues:
1. A 404 error occurring when you were redirected to `/login` after
authentication.
- `App.tsx` now handles the `/login` route:
- Authenticated users are redirected from `/login` to `/` (dashboard).
- Unauthenticated users are directed to a new `SignInTriggerPage`
component that automatically initiates the `signIn()` process from
`AuthContext`.
2. The main "Sign In / Sign Up" button on `PublicHome.tsx` was not
triggering the Google authentication flow.
- The button in `PublicHome.tsx` now correctly calls the `signIn()`
function from `AuthContext` instead of linking to `/login`.
These changes should improve the login flow and ensure the primary call to action on the public page works as intended.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit addresses two issues:
/loginafter authentication.App.tsxnow handles the/loginroute:/loginto/(dashboard).SignInTriggerPagecomponent that automatically initiates the
signIn()process fromAuthContext.PublicHome.tsxwas nottriggering the Google authentication flow.
PublicHome.tsxnow correctly calls thesignIn()function from
AuthContextinstead of linking to/login.These changes should improve the login flow and ensure the primary call to action on the public page works as intended.