HooksuseAccounts

useAccounts

() => ({ principal: Principal, subaccount?: SubAccount}[] | undefined)

Will return connected accounts in case IdentityKitProvider.authType is set to IdentityKitAuthType.ACCOUNTS and user is connected, otherwise will be undefined:

Usage

import { useAccounts } from "@nfid/identitykit/react"
 
const accounts = useAccounts()