From 2b95f82e7320e01791086ee712f9fb6cc754b3f1 Mon Sep 17 00:00:00 2001 From: zhangqingwu <18656007202@163.com> Date: Thu, 9 Feb 2023 10:29:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20update=20talkee=20host?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/late-boats-film.md | 5 +++++ packages/talkee/src/components/Talkee.vue | 7 ++----- packages/talkee/src/index.ts | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 .changeset/late-boats-film.md diff --git a/.changeset/late-boats-film.md b/.changeset/late-boats-film.md new file mode 100644 index 00000000..4bffb707 --- /dev/null +++ b/.changeset/late-boats-film.md @@ -0,0 +1,5 @@ +--- +"@foxone/talkee": patch +--- + +update talkee host diff --git a/packages/talkee/src/components/Talkee.vue b/packages/talkee/src/components/Talkee.vue index 1f9f1bf9..171aeb05 100644 --- a/packages/talkee/src/components/Talkee.vue +++ b/packages/talkee/src/components/Talkee.vue @@ -72,16 +72,13 @@ async function handleLoggin() { clientId: globals.clientId.value, authMethods: props.authMethods as any[], scope: "PROFILE:READ PHONE:READ", - getTokenByCode: async (code) => - ( - await auth({ method: AuthMethod.MixinOAuth, mixin_oauth_code: code }) - ).access_token, origin: "Talkee", + pkce: true, }); let token = data.token; - if (data.channel === "fennec") { + if (data.channel === "fennec" || data.channel === "mixin") { token = ( await auth({ method: AuthMethod.MixinToken, mixin_token: token }) ).access_token; diff --git a/packages/talkee/src/index.ts b/packages/talkee/src/index.ts index efb28f15..e4d4a649 100644 --- a/packages/talkee/src/index.ts +++ b/packages/talkee/src/index.ts @@ -45,7 +45,7 @@ function show( showLink: options.showLink, siteId: options.siteId || "", slug: options.slug || "", - apiBase: options.apiBase || "https://talkee-api.mixin.fan/api", + apiBase: options.apiBase || "https://talkee-api.pando.im/api", clientId: options.clientId || "61504be8-a9da-477d-9e18-448ac3780919", authMethods: options.auth?.authMethods, };