Accessing Netlify identity in functions for SSR (NextJS)

So I have Netlify Identity set up on my site using react-netlify-identity and am using it to secure some Lambda Function endpoints. Everything works fine as long as I pass the access token along from the client.
The issue is I am server side rendering my site using NextJS (also running in a Function) and would like to use secured data in the initial render. Is there a way I can get the access token (and probably refresh token) for the current user inside the SSR function itself, perhaps by accessing the cookie?

Hey! Pardon my ignorance but I see NextJS and server side rendering and I immediately feel compelled to share… this!