Getting StartedAdvanced Options

IdentityKitProvider also allows to set some advanced props listed below:

signerClientOptions

import { IdentityKitProvider } from "@nfid/identitykit/react"
 
export const YourApp = () => {
  return (
    <IdentityKitProvider signerClientOptions={{}}>
      <ConnectWallet />
    </IdentityKitProvider>
  )
}

maxTimeToLive

bigint

Expiration of the delegation in nanoseconds, optional, 28_800_000_000_000 (8 hours) by default.

storage

AuthClientStorage | undefined

Optional storage with methods set, get and remove, IndexedDB by default.

keyType

"ECDSA" | "Ed25519" | undefined

If you are using a custom storage provider that does not support CryptoKey storage, you should use Ed25519 as the key type, as it can serialize to a string. Ed25519 will be used by default.

identity

identity: SignIdentity | PartialIdentity | undefined

Optional identity to use as base.

idleOptions

Customize idle

import { IdentityKitProvider } from "@nfid/identitykit/react"
 
export const YourApp = () => {
  return (
    <IdentityKitProvider
      signerClientOptions={{
        idleOptions: {},
      }}
    >
      <ConnectWallet />
    </IdentityKitProvider>
  )
}

idleTimeout

number

Timeout to logout user due to inactivity in milliseconds, optional, 14_400_000 (4 hours) by default, maximum value is 2_147_483_647 (~24 days, max 32 bit integer), will be used in case of bigger provided value.

disableIdle

boolean

Disable logout on idle timeout, enabled by default.

crypto

Pick<Crypto, "getRandomValues" | "randomUUID"> | undefined

Optional, used to generate random bytes, browser/node Crypto by default.

window

Window | undefined

Optional relying party window, used to listen for incoming message events, globalThis.window by default.

allowInternetIdentityPinAuthentication

boolean | undefined

If present, indicates whether or not the Identity Provider should allow the user to authenticate and/or register using a temporary key/PIN identity.