How to make persisten realm-web SDK session in React

What is the best way to make SDK persistent for a react-js app?

For example:

import { useEffect, useState } from "react";
import * as Realm from "realm-web";
export function useApp() {
  const [app, setApp] = useState(null);
  // Run in useEffect so that App is not created in server-side environment
  useEffect(() => {
  }, []);
  return app;

If I log-in a user and I attempt to store his session in the browser for reload or handle time and not to auth every time I close my browser/window

const login = async (values) => {
  const { email, password } = values;
  await app.logIn(Credentials.emailPassword(email, password))
  const session = app.currentUser
  // I'm using localStorage as an example of how to persist it into a browser
  window.localStorage.setItem("session", JSON.stringify(session))


So, after this tiny explanation. How can I redo-session or re-auth after a browser entire reload?
As session is an instance of realm-web SDK I can’t store all functions that allow me to query mongodb

I didn’t found anything closer to the issue in the doc or in mongodb doc.