From 0a4b360745bd644e281c8bffd2285a6fb345041b Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Wed, 12 Feb 2025 18:24:57 +0800 Subject: [PATCH] feat: update AIHubMix OAuth and release workflow configuration --- .github/workflows/release.yml | 3 +++ src/main/services/WindowService.ts | 2 +- src/renderer/src/utils/oauth.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b43f8493..44e77aab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,6 +70,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RENDERER_VITE_AIHUBMIX_SECRET: ${{ vars.RENDERER_VITE_AIHUBMIX_SECRET }} - name: Build Mac if: matrix.os == 'macos-latest' @@ -82,6 +83,7 @@ jobs: APPLE_ID: ${{ vars.APPLE_ID }} APPLE_APP_SPECIFIC_PASSWORD: ${{ vars.APPLE_APP_SPECIFIC_PASSWORD }} APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }} + RENDERER_VITE_AIHUBMIX_SECRET: ${{ vars.RENDERER_VITE_AIHUBMIX_SECRET }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Build Windows @@ -89,6 +91,7 @@ jobs: run: yarn build:win env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RENDERER_VITE_AIHUBMIX_SECRET: ${{ vars.RENDERER_VITE_AIHUBMIX_SECRET }} - name: Replace spaces in filenames run: node scripts/replace-spaces.js diff --git a/src/main/services/WindowService.ts b/src/main/services/WindowService.ts index 560431f5..1ce7eb8a 100644 --- a/src/main/services/WindowService.ts +++ b/src/main/services/WindowService.ts @@ -167,7 +167,7 @@ export class WindowService { const oauthProviderUrls = [ 'https://account.siliconflow.cn/oauth', 'https://cloud.siliconflow.cn/expensebill', - 'https://aihubmix.com/oauth', + 'https://aihubmix.com/token', 'https://aihubmix.com/topup' ] diff --git a/src/renderer/src/utils/oauth.ts b/src/renderer/src/utils/oauth.ts index 224098b2..c160d49d 100644 --- a/src/renderer/src/utils/oauth.ts +++ b/src/renderer/src/utils/oauth.ts @@ -23,7 +23,7 @@ export const oauthWithSiliconFlow = async (setKey) => { } export const oauthWithAihubmix = async (setKey) => { - const authUrl = ` https://aihubmix.com/oauth?client_id=cherry_studio_oauth&lang=${getLanguageCode()}&aff=SJyh` + const authUrl = ` https://aihubmix.com/token?client_id=cherry_studio_oauth&lang=${getLanguageCode()}&aff=SJyh` const popup = window.open( authUrl,