Web3Auth modal connect() never returns when the modal is closed without signing in #1366
edouardruiz
announced in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue title: Return
null
fromweb3auth.connect()
when the user closes the modal without signing inDescribe the question
The
@web3auth/modal
documentation regardingconnect()
states that it will return aSafeEventEmitterProvider
instance on success andnull
value on error. This is correct according to what I see in the code and the events listened by theWeb3Auth
instance (ADAPTER_EVENTS.CONNECTED
andADAPTER_EVENTS.ERRORED
).However when the user closes the modal without signing in, no event is fired and no promise ever resolves until the user opens the modal again and actually tries to login. Multiple events are then fired if he fails or succeeds since the event listeners attached on the first attempt aren't removed.
Steps to Reproduce
Steps to reproduce the behavior:
web3auth.connect()
callExpected behavior:
It would make sense to return
null
fromconnect()
when the modal is closed without any login attempt.Platform Details
@web3auth/modal
)Additional context
You can wrap the call to
connect()
inconsole.log
to see that all after statements are triggered when theconnect()
promise resolves.Beta Was this translation helpful? Give feedback.
All reactions