1 min readJun 6, 2020
First of all, thank you very much, this is very helpfull. But I ran into a problem. It's explained in typescript and I use javascript. So I used getServerSideAuth(context.req) as follows:
export async function getServerSideProps(context) {
// getServerSideAuth will parse the cookie
const initialAuth = getServerSideAuth(context.req);
return { props: { initialAuth } };
}
And then I Try to access it as:
const Home= ({initialAuth}) => {
console.log("props is: " +util.inspect(initialAuth))
....
}
But I get the null for `initialAuth`