Events Introduction
Events are a way to listen for SDK events and run your own code at certain points.
Dynamic Events
An alternative to using event callbacks or useDynamicEvents
react hook is to use dynamicEvents
emitter directly.
Event callbacks
You do not need to import anything extra to make use of event callbacks, instead simply add them using the events field inside the settings prop on DynamicContextProvider.
If you are looking for synchronous actions that will block the user until completion, please look at Handlers
onAuthFlowCancel: Called when the auth modal is closed before authentication is successful (alongside onAuthFlowClose
).
onAuthFlowClose: Called whenever the auth flow modal is closed.
onAuthFlowOpen: Called after the auth flow modal is opened.
onAuthFailure: Called when authentication fails.
onAuthInit: Called when an authentication process begins.
onAuthSuccess: Called after the user successfully authenticates.
onEmbeddedWalletCreated: Called after embedded wallet created for user.
onLogout: Called after the user logs out.
onOtpVerificationResult: Called when an email or SMS OTP verification succeeds or fails.
onSignedMessage: Called when the user signs a message and it allows you to act on that message.
onUserProfileUpdate: Called when the user successfully updated their profile.
onWalletAdded: Called when a new wallet is added to the user wallets.
onWalletRemoved: Called when a wallet is removed from the user wallets.
Was this page helpful?