Summary

This callback will be called when an authentication process initiates.

  • For wallets, this is when signature is requested.
  • For email and SMS, this is as soon as user provides the phone number or email address.
  • For social, this is as soon as user selects a social provider.

Usage

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

Callback Argument Value

{
  type: "email";
  option: string;
} | {
  type: "social";
  option: ProviderEnum;
} | {
  type: "wallet";
  option: string;
} | {
  type: "sms";
  option: PhoneData;
}

For details about ProviderEnum, see here

For details about PhoneData, see here