Using unsupported backend (Fastify.js) - how to persist auth0-spa-js in server-side session?

How do I regenerate login session from server-side storage? So as not to use localStorage.

I am also using firebase-auth, but it is based on localStorage persistence. Not sure if it is safe. Also, localStorage is broken in Brave browser.

I need both authenticated pages and API security, BTW.