How to persist Web3AuthCore?

Hello everyone! I've read the web3auth's guides, and in every example they create a Web3AuthCore with a simple login page. But non explains how to keep the Web3AuthCore data without reinitialize it every time a user moves to another page. I was expecting a React component that wraps the app, but I couldn't find it on the github. Maybe I'm missing something.

How do webapps persist the Web3AuthCore element, with LocalSotarage/Context API solution? Is the only way I've find out.



Originally posted by: ander-db

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/1247

Hi @ander-db

Yes, most of the react apps use context API to store the web3auth data.

Web3authCore.init takes care of initializing this data for you from local storage, so you don't need to worry about using the local storage and rehydrating the data.

Please follow this example for more info -- https://github.com/Web3Auth/web3auth-web/tree/master/demo/react-app



Originally posted by: arch1995