Skip to content

Commit

Permalink
✨ Support setting client id in authcore
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Mar 7, 2024
1 parent df54cdc commit bbe1c51
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions example/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '',

Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export interface LikeCoinWalletConnectorConfig {
connectWalletTitle?: string;
connectWalletMobileWarning?: string;

authcoreClientId?: string;
authcoreApiHost?: string;
authcoreRedirectUrl?: string;

Expand Down
1 change: 1 addition & 0 deletions src/utils/authcore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export async function initAuthcore(
}

new AuthCoreWidgets.Login({
clientId: options.authcoreClientId,
primaryColour: '#28646e',
container: containerId,
root: `${authcoreApiHost}/widgets`,
Expand Down

0 comments on commit bbe1c51

Please sign in to comment.