onAuthSuccess

Summary

This callback will be called after the user successfully authenticates by signing a message to confirm ownership. This only happens when using the connect-and-sign initialAuthenticationMode.

Usage

<DynamicContextProvider
  settings={{
    eventsCallbacks: {
      onAuthSuccess: (args) => {
        console.log('onAuthSuccess was called', args);
      }
    }
  }}
>
 {/* ... rest of your app ... */}
</DynamicContextProvider>

Callback Argument Value

{
  authToken: string;
  handleLogOut: () => Promise<void>;
  isAuthenticated: boolean;
  user: UserProfile;
  walletConnector: WalletConnector;
}

πŸ“˜

For details about UserProfile, see here: https://docs.dynamic.xyz/docs/userprofile

For details about WalletConnector, see here: https://docs.dynamic.xyz/docs/walletconnector


What’s Next