-
Notifications
You must be signed in to change notification settings - Fork 397
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
Improve types in server-side withPageAuthRequired #554
Improve types in server-side withPageAuthRequired #554
Conversation
@misoton665 is attempting to deploy a commit to the Auth0 Team on Vercel. A member of the Team first needs to authorize it. |
What is the status of this PR? |
Hi @misoton665 - thanks for raising this, apologies for the delay, I haven't got round to looking at this yet. I will do shortly |
Hi @misoton665 If I add a single type parameter to the server side version of I think you need to add a default type argument of
|
@adamjmcgrath |
Thanks @misoton665 |
By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
This PR is about server-side withPageAuthRequired.
Because
withPageAuthRequired
does not accept Query as a type parameter, it's returned GetServerSideProps with a default Query type of ParsedUrlQuery.The type of this will be
GetServerSideProps<P, ParsedUrlQuery>
no matter what type of getServerSideProps is passed.In this PR, withPageAuthRequired has been changed so that Query can also be specified as a type parameter.
Testing
Since this is a modification of the type definition, no tests have been added.
Checklist
main