Replies: 2 comments 3 replies
-
The |
Beta Was this translation helpful? Give feedback.
-
I'm not super familiar with how web3auth works, but you might be able to call this:
in a So in that use effect you could call |
Beta Was this translation helpful? Give feedback.
-
I need some assistance with my React application (based on https://github.com/alchemyplatform/aa-sdk/tree/main/examples/aa-simple-dapp). I have a React context that is initialized by clicking a button that calls
login
, which triggers the Web3Auth modal. However, since React context is not preserved between page refreshes, I need to click the login button again after a refresh to reinitialize the context.I tried to replicate the login process in a
useEffect
hook, but I have to callsigner.authenticate
, which briefly shows and then immediately dismisses the modal. While this approach works, it doesn't provide a great user experience.After refreshing the page, the Web3Auth session appears to persist since the modal doesn't appear. Is there a way to maintain the signer and smart account client/provider between page refreshes?
Calling the UserOp using the context provider:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions