-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(adapter-nextjs): make createAuthRouteHandlers interface work in both App and Pages routers #13840
Open
HuiSF
wants to merge
7
commits into
hui/feat/adapter-nextjs/4-check-signed-in-user
Choose a base branch
from
hui/fix/adapter-nextjs/5-handler-type-def
base: hui/feat/adapter-nextjs/4-check-signed-in-user
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
HuiSF
requested review from
ukhan-amazon,
haverchuck,
cshfang and
jimblanc
as code owners
September 23, 2024 21:40
HuiSF
changed the title
feat(aws-amplify|adapter-nextjs): add runtimeOptions.cookies to createServerRunner
fix(adapter-nextjs): make createAuthRouteHandlers interface work in both App and Pages routers
Sep 23, 2024
HuiSF
force-pushed
the
hui/feat/adapter-nextjs/4-check-signed-in-user
branch
from
October 1, 2024 23:03
583f9f0
to
df708b8
Compare
HuiSF
force-pushed
the
hui/fix/adapter-nextjs/5-handler-type-def
branch
from
October 1, 2024 23:03
7a35370
to
0779333
Compare
…sign-in and sign-up
HuiSF
force-pushed
the
hui/feat/adapter-nextjs/4-check-signed-in-user
branch
from
November 21, 2024 17:06
df708b8
to
1cd0bd6
Compare
…oth App and Pages routers
HuiSF
force-pushed
the
hui/fix/adapter-nextjs/5-handler-type-def
branch
from
November 21, 2024 17:07
0779333
to
ccca0a9
Compare
jjarvisp
reviewed
Dec 5, 2024
// work in both App Router `routes.ts` and Pages router. The former has a | ||
// restrict handler function interface type check. The parameters types are | ||
// properly typed internally, and runtime validation is place. | ||
| any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. A better solution than splitting handlers by router type and there is not much lost utility from not having this fully typed externally.
jjarvisp
approved these changes
Dec 5, 2024
HuiSF
force-pushed
the
hui/feat/adapter-nextjs/4-check-signed-in-user
branch
from
December 23, 2024 22:57
1cd0bd6
to
a89048c
Compare
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.
Description of changes
Issue #, if available
Make the public handler function type as any to let the single function to be compatible with the type checks that happens in both the App router and Pages router.
Description of how you validated changes
npx next build
Checklist
yarn test
passesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.