OnAuthSuccess

This callback will be called after the user successfully authenticates.

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

⚠️

Deprecation Warning

The top-level onAuthSuccess prop is deprecated. It will continue to work, but please use the onAuthSuccess prop nested in eventsCallbacks. We will eventually remove the top-level onAuthSuccess prop.


What’s Next