Skip to content

Documentation / expo / CustomAuthProviderConfig

Type alias: CustomAuthProviderConfig

CustomAuthProviderConfig: Object

Type declaration

enabled?

enabled?: boolean

If true, enable custom authentication integration. This enables a JWT from a custom auth provider to be used to authenticate Privy embedded wallets. Defaults to true.

Default

ts
true

getCustomAccessToken

getCustomAccessToken: () => Promise<string | undefined>

A callback that returns the user's custom auth provider's access token as a string. Can be left blank if using cookies to store and send access tokens

Returns

Promise<string | undefined>

Example

ts
const {getAccessTokenSilently} = useAuth();

<PrivyProvider
  {...props}
  config={{
    customAuth: {
      getCustomAccessToken: getAccessTokenSilently
    },
  }}
/>

isLoading

isLoading: boolean

Custom auth providers loading state

Example

ts
const {isLoading} = useAuth();

<PrivyProvider
  {...props}
  config={{
    customAuth: {
      isLoading,
    },
  }}
/>