auth redirect flow + protected swipe interactions#18
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 pr improves the authentication flow by redirecting unauthenticated users to sign in and returning them to their original page afterward. it also protects swipe interactions across the app and standardizes the application branding by replacing the previous logo.
auth redirect system
return-to-page authentication
unauthenticated users are now redirected to sign in while preserving their current page so they can return after login.
changes:
usePathnameanduseSearchParamsto capture the current URLgetNextUrl()helper to reconstruct the current routeredirectToSignIn()helper that navigates to/signin?next=...behavior:
nextparameterresult:
authentication no longer disrupts the user's flow and allows them to continue where they left off.
signin page redirect handling
post-login navigation
the sign-in page now reads the
nextparameter and redirects users accordingly.changes:
useSearchParamsto read thenextquery parametersafeNextvalidation to ensure redirects only occur to internal routesresult:
users automatically return to the page they were on before signing in.
protected swipe interactions
swipe access control
swipe functionality now requires authentication.
changes:
isAuthenticatednot-allowedcursor when the user is not authenticatedresult:
prevents anonymous swipe interactions while guiding users toward authentication.
sign-in prompts in swipe view
user guidance improvements
additional prompts help explain why sign-in is required.
changes:
result:
users clearly understand why authentication is required.
product page swipe protection
listing interaction guard
product pages now enforce the same authentication requirement for swipe actions.
changes:
result:
interaction rules are consistent across the app.
branding update
logo replacement
the application logo was updated across the project.