diff --git a/src/helpers/with-page-auth-required.ts b/src/helpers/with-page-auth-required.ts index 926f5a626..bf32f847e 100644 --- a/src/helpers/with-page-auth-required.ts +++ b/src/helpers/with-page-auth-required.ts @@ -7,6 +7,7 @@ import { WithPageAuthRequiredProps } from '../frontend/with-page-auth-required'; import { withPageAuthRequired as withPageAuthRequiredCSR } from '../frontend'; +import { ParsedUrlQuery } from 'querystring'; /** * If you wrap your `getServerSideProps` with {@link WithPageAuthRequired} your props object will be augmented with @@ -32,7 +33,9 @@ export type GetServerSidePropsResultWithSession
= GetServerSidePropsRes * * @category Server */ -export type PageRoute
= (cts: GetServerSidePropsContext) => Promise = (
+ cts: GetServerSidePropsContext = (cts: GetServerSidePropsContext) => Promise ;
+export type WithPageAuthRequiredOptions = {
+ getServerSideProps?: GetServerSideProps ;
returnTo?: string;
};
@@ -85,7 +88,7 @@ export type WithPageAuthRequiredOptions = {
* @category Server
*/
export type WithPageAuthRequired = {
- (opts?: WithPageAuthRequiredOptions ): PageRoute ;
+ (opts?: WithPageAuthRequiredOptions ): PageRoute ;
(
Component: ComponentType ,
options?: WithPageAuthRequiredCSROptions
+) => Promise