diff --git a/example/pages/index.vue b/example/pages/index.vue index 9e7f6b4..13024b1 100644 --- a/example/pages/index.vue +++ b/example/pages/index.vue @@ -253,6 +253,7 @@ export default { connectWalletMobileWarning: 'Mobile Warning', language: 'zh', + authcoreClientId: 'likecoin-app-hidesocial', authcoreApiHost: 'https://likecoin-integration-test.authcore.io', authcoreRedirectUrl: 'http://localhost:3000/in/register?method=liker-id', diff --git a/src/index.tsx b/src/index.tsx index 272b846..b15e75c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -132,6 +132,7 @@ export class LikeCoinWalletConnector { : true, language: options.language || 'en', + authcoreClientId: options.authcoreClientId || 'likecoin-app', authcoreApiHost: options.authcoreApiHost || 'https://authcore.like.co', authcoreRedirectUrl: options.authcoreRedirectUrl || '', diff --git a/src/types.ts b/src/types.ts index 016c1f6..da2f59e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -96,6 +96,7 @@ export interface LikeCoinWalletConnectorConfig { connectWalletTitle?: string; connectWalletMobileWarning?: string; + authcoreClientId?: string; authcoreApiHost?: string; authcoreRedirectUrl?: string; diff --git a/src/utils/authcore.ts b/src/utils/authcore.ts index 5b7e535..ab8eff2 100644 --- a/src/utils/authcore.ts +++ b/src/utils/authcore.ts @@ -62,6 +62,7 @@ export async function initAuthcore( } new AuthCoreWidgets.Login({ + clientId: options.authcoreClientId, primaryColour: '#28646e', container: containerId, root: `${authcoreApiHost}/widgets`,