From 6674946c7c9aaa28c84125ef09c051f57b733ad9 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 18 Jul 2025 18:02:19 +0800 Subject: [PATCH] feat: update redirectUri --- open-isle-cli/src/utils/discord.js | 2 +- open-isle-cli/src/utils/github.js | 2 +- open-isle-cli/src/utils/twitter.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/open-isle-cli/src/utils/discord.js b/open-isle-cli/src/utils/discord.js index 97f6ebfdb..2eed5abdd 100644 --- a/open-isle-cli/src/utils/discord.js +++ b/open-isle-cli/src/utils/discord.js @@ -6,7 +6,7 @@ export function discordAuthorize(state = '') { toast.error('Discord 登录不可用') return } - const redirectUri = `${window.location.origin}/discord-callback` + const redirectUri = `https://www.open-isle.com/discord-callback` const url = `https://discord.com/api/oauth2/authorize?client_id=${DISCORD_CLIENT_ID}&redirect_uri=${encodeURIComponent(redirectUri)}&response_type=code&scope=identify%20email&state=${state}` window.location.href = url } diff --git a/open-isle-cli/src/utils/github.js b/open-isle-cli/src/utils/github.js index 82dcfab46..0a7c2567b 100644 --- a/open-isle-cli/src/utils/github.js +++ b/open-isle-cli/src/utils/github.js @@ -6,7 +6,7 @@ export function githubAuthorize(state = '') { toast.error('GitHub 登录不可用') return } - const redirectUri = `${window.location.origin}/github-callback` + const redirectUri = `https://www.open-isle.com/github-callback` const url = `https://github.com/login/oauth/authorize?client_id=${GITHUB_CLIENT_ID}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=user:email&state=${state}` window.location.href = url } diff --git a/open-isle-cli/src/utils/twitter.js b/open-isle-cli/src/utils/twitter.js index 02816c6c3..e0ae2ba72 100644 --- a/open-isle-cli/src/utils/twitter.js +++ b/open-isle-cli/src/utils/twitter.js @@ -27,7 +27,7 @@ export async function twitterAuthorize(state = '') { if (state === '') { state = Math.random().toString(36).substring(2, 15) } - const redirectUri = `${window.location.origin}/twitter-callback` + const redirectUri = `https://www.open-isle.com/twitter-callback` const codeVerifier = generateCodeVerifier() sessionStorage.setItem('twitter_code_verifier', codeVerifier) const codeChallenge = await generateCodeChallenge(codeVerifier)