Type alias WithPageAuthRequiredPageRouterOptions<P, Q>
WithPageAuthRequiredPageRouterOptions<P, Q>: {
getServerSideProps?: GetServerSideProps<P, Q>;
returnTo?: string;
}
Type Parameters
P extends {
[key: string]: any;
} = {
[key: string]: any;
}
Q extends ParsedUrlQuery = ParsedUrlQuery
Type declaration
Optional
getServerSideProps?: GetServerSideProps<P, Q>
Optional
returnTo?: string
If you have a custom returnTo url you should specify it in
returnTo
.You can pass in your own
getServerSideProps
method, the props returned from this will be merged with the user props. You can also access the user session data by callinggetSession
inside of this method. For example: