title: (NextAuth) Type error: Property 'session' does not exist on type '{}'
body: <p>I'm using NextAuth on a NextJs project and I'm getting the error <code>&quot;Type error: Property 'session' does not exist on type '{}'.&quot;</code>. I'm adding the <code>session</code> property to my _app.tsx as suggested here:</p>
  <p><a href="https://next-auth.js.org/getting-started/example" rel="noreferrer">https://next-auth.js.org/getting-started/example</a></p>
  <p>I've also added that property to my custom <code>MyApp</code> type interface but I still get the error. Follow my code:</p>
  <pre><code>import { NextComponentType } from &quot;next&quot;;
  import { Session } from &quot;next-auth&quot;;
  
  export interface CustomAppProps extends AppProps {
    Component: NextComponentType &amp; { auth?: boolean; session?: Session };
  }
  
  function MyApp({ Component, pageProps: { session, ...pageProps } }: CustomAppProps) {
    //...
  });
  </code></pre>
  <p>How can I fix it? Thanks!</p>
  <p>Edit #1 (adding <code>MyApp</code> with my current code):</p>
  <pre><code>function MyApp({ Component, pageProps: { session, ...pageProps } }: CustomAppProps) {
  
    return (
      &lt;&gt;
        &lt;CookieConsentProvider useCookieConsentHooksOptions={{ consentCookieAttributes: { expires: 360 } }}&gt;
          &lt;SessionProvider session={session}&gt;
            &lt;AppContextProvider&gt;
              &lt;Component {...pageProps} /&gt;
            &lt;/AppContextProvider&gt;
          &lt;/SessionProvider&gt;
        &lt;/CookieConsentProvider&gt;
      &lt;/&gt;
    );
  }
  </code></pre>
  <p>Edit #2:</p>
  <pre><code>function MyApp({ Component, pageProps }: AppProps) {
  
    return (
      &lt;&gt;
        &lt;CookieConsentProvider useCookieConsentHooksOptions={{ consentCookieAttributes: { expires: 360 } }}&gt;
          &lt;SessionProvider session={pageProps.session}&gt;
            &lt;AppContextProvider&gt;
              &lt;Component {...pageProps} /&gt;
            &lt;/AppContextProvider&gt;
          &lt;/SessionProvider&gt;
        &lt;/CookieConsentProvider&gt;
      &lt;/&gt;
    );
  }
  </code></pre>
  <p>Using the code above I still get the TS error:</p>
  <p><a href="https://i.stack.imgur.com/9VkU5.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/9VkU5.jpg" alt="enter image description here" /></a></p>