Skip to main content

Interface: PrivyProviderProps

Properties to initialize the PrivyProvider.

Properties

appId

appId: string

Your Privy App ID, which can be retrieved from the Privy console.


onError

Optional onError: (isNotAllowed: boolean) => void

Type declaration

▸ (isNotAllowed): void

This feature is under active development.

An optional callback that will execute if a login call fails.

Within this callback, you can access:

  • an isNotAllowed boolean flag indicating if the user was prevented from logging in by your app's allowlist, if you have one enabled
Parameters
NameType
isNotAllowedboolean
Returns

void


onSuccess

Optional onSuccess: (user: User, isNewUser: boolean) => void

Type declaration

▸ (user, isNewUser): void

An optional callback that will execute once a login call successfully completes.

Within this callback, you can access:

  • the user object corresponding to the authenticated user
  • an isNewUser boolean flag indicating if this is the user's first time logging in to your app
Parameters
NameType
userUser
isNewUserboolean
Returns

void