Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Using getInitialProps to Detect Auth in SSR with TypeScript

This example shows how to use getInitialProps to detect a user's authenticated state during SSR. Static optimization is not supported with this architecture. If you need to support static optimization (hint: you should) then you should use the variation of this which detects auth client-side. The architecture is explained in this blog post. This example is also available without TypeScript.