Skip to content
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 types in server-side withPageAuthRequired #512

Merged
merged 2 commits into from
Oct 7, 2021
Merged

Fix types in server-side withPageAuthRequired #512

merged 2 commits into from
Oct 7, 2021

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Oct 7, 2021

Description

This PR changes the type definitions of GetServerSidePropsResultWithSession and WithPageAuthRequiredOptions to take the props type as a generic parameter, instead of relying on [key: string]: any; for typing properties other than user. Consequently, PageRoute and WithPageAuthRequired were modified as well to pass P through.

References

Fixes #309

Testing

This is merely a change in the type definitions, so no unit tests were added.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

@Widcket Widcket added CH: Fixed PR is fixing a bug review:tiny Tiny review labels Oct 7, 2021
@Widcket Widcket requested a review from a team as a code owner October 7, 2021 14:12
@vercel
Copy link

vercel bot commented Oct 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/auth0/nextjs-auth0/B4NjzQAtR4aLmnmLwGRtqUTbx3wa
✅ Preview: Canceled

@Widcket Widcket merged commit 5ef6a7b into main Oct 7, 2021
@Widcket Widcket deleted the tmp/generics branch October 7, 2021 14:54
@adamjmcgrath adamjmcgrath mentioned this pull request Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Fixed PR is fixing a bug review:tiny Tiny review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

withPageAuthRequired for getServerSideProps breaks typing for InferGetServerSidePropsType
2 participants