title: Get localStorage in NextJs getInitialProps
body: <p>I working with localStorage token in my next.js application. I tried to get the localStorage on page getInitialProps but, it returns <code>undefined</code>.</p>
  
  <p>Here is an example,</p>
  
  <pre><code>Dashboard.getInitialProps = async () =&gt; {
    const token = localStorage.getItem('auth');
    const res = await fetch(`${process.env.API_URL}/pages/about`, {
      headers: { 'Authorization': token }
    });
    const data = await res.json();
  
    return { page: data };
  }
  </code></pre>