How to properly wait for the initialization

We are using react noModal with openlogin + twitter and we follow the documentation and do await web3auth.init() as early as possible. After this, we do not know yeat if sessions exists or valid or we are connected. We have to wait, but do we wait for. In the source code of the library emit the connected event if successfully connected. But if we are not connected the event is never raised. I need to make a decision to send user to login page or to wait and I am not sure how to do it.

@alex3 Thanks for your recent post.

If there is an error in connecting, the event ADAPTER_EVENTS.ERRORED will be triggered with the @web3auth/base package.

If the session does not exist yet or in the process of connecting, you can refer to the event ADAPTER_EVENTS.CONNECTING

Let me know if this answers your question.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.