title: NextJS - get url in getServerSideProps
body: <p>I'm using nextJS and I'm having a hard time getting the full URL from a redirect.</p>
  
  <p>I'm doing an oauth flow from Twitch and after authenticating, Twitch redirects back to my Next app on a URL like <code>http://localhost:3000/auth/twitch/</code> - they include a bunch of extra data on that redirect url e.g.
  <code>http://localhost:3000/auth/twitch/callback#access_token=4kfdiopdsjendc539c9234&amp;scope=user_read&amp;token_type=bearer</code></p>
  
  <p><code>/pages/auth/callback.js</code></p>
  
  <pre><code>export async function getServerSideProps(context) {
    console.log(context);
    return {
      props: {},
    };
  }
  </code></pre>
  
  <p>I'm trying to get the queryparams (e.g. access_token) from the redirect has but since Twitch append it onto my redirect url with a #, nothing inside of <code>context</code> seems to detect it.</p>
  
  <p>I know if I manually change the <code>#</code> in the browser to a <code>?</code> then <code>context.query</code> works. Problem is, I can't dictate how Twitch attack their data to the URL.</p>
  
  <p>How can I access the query params?</p>