Skip to main content

Configuration

If you wish to support Apple and Google authorization, you'll need to configure your clientId. For instructions on how to configure this, you can refer to the official documentations:

Usage

import {ConfigProvider} from '@portkey/did-ui-react';

ConfigProvider.setGlobalConfig({
graphQLUrl: 'https://dapp-aa-portkey-test.portkey.finance/Portkey_V2_DID/PortKeyIndexerCASchema/graphql',
requestDefaults: {
baseUrl: '/portkey'
},
});

API

PropertyDescriptionTypeDefaultVersion
networkNetwork information configuration. If you scan QR code to log in, it's essential to set up the defaultNetwork. For web clients, you'll need to configure a proxy service yourself as we do not handle cross-origin requests.NetworkInfo-
socialLoginWhen you log in via Apple and Google, you'll need to configure info like your clientId.ISocialLoginConfigPortkey config
requestDefaultsAPI request configuration. Cross-origin issues will be handled separately.IRequestDefaults-
graphQLUrlIndexer address. Cross-origin issues need to be handled separately.string-
storageMethodStorage method. You can configure where data should be stored yourself, and the default setting is in localstorage.IStorageSuite-
reCaptchaConfigHuman-computer interaction configuration. The default setting is to use Portkey's reCaptcha configuration.BaseReCaptchaPortkey config
serviceUrlYou must configure this if you want to enable on/off ramp services.stringhttps://aa-portkey.portkey.finance