diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b43f849397..44e77aab2f 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 560431f547..1ce7eb8a22 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 224098b25d..c160d49d0e 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,