feat(adapter-nextjs): support dynamic redirect after sign-in using redirectTo query param#14779
feat(adapter-nextjs): support dynamic redirect after sign-in using redirectTo query param#14779TiwariLokesh wants to merge 1 commit intoaws-amplify:mainfrom
Conversation
…directTo query param
|
|
hey @TiwariLokesh This PR looks good so far. While I can see the use-case for scenario-specific Can you quickly guide me through your flow? Ideally highlighting, when you would set the |
Description of changes
This PR adds support for dynamic redirects after sign-in in the Next.js adapter by introducing a
redirectToquery parameter.Currently, users are always redirected to a static
redirectOnSignInCompletepath after authentication. This change allows users to be redirected back to their originally requested page.Issue #, if available
Fixes #14677
Description of how you validated changes
Verified redirect logic by extracting and testing query parameter handling locally
Confirmed that:
/dashboard) are correctly used for redirectionhttps://example.com) are ignoredredirectOnSignInCompleteworks whenredirectTois absent or invalidSuccessfully built the project using
yarn buildwith no errorsChecklist
yarn testpasses