React Authentication

I’ve been trying to create a react auth context that will keep my users logged in on a page refresh when using internet identity.

Would you be able to point me towards documenation that can do this?

FYI https://github.com/ICEvent/OneBlock/blob/72b028d80b1a76ca5252917e3b68aaa98d6cf8d3/frontend/pages/Home.tsx#L76C20-L76C20