From ed1120927ca8362ef28920abfeff1e277438f7b3 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <93375423+prafull-opensignlabs@users.noreply.github.com> Date: Tue, 23 Apr 2024 12:31:47 +0530 Subject: [PATCH] fix: redirect_uri mismatch in googleauth --- apps/OpenSignServer/cloud/customRoute/googleauth.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/OpenSignServer/cloud/customRoute/googleauth.js b/apps/OpenSignServer/cloud/customRoute/googleauth.js index 551f1f4e1..0b7d44f35 100644 --- a/apps/OpenSignServer/cloud/customRoute/googleauth.js +++ b/apps/OpenSignServer/cloud/customRoute/googleauth.js @@ -17,7 +17,9 @@ export default async function gooogleauth(request, response) { const clientId = process.env.GOOGLE_CLIENT_ID; const clientSecret = process.env.GOOGLE_CLIENT_SECRET; const redirectUri = - baseUrl?.hostname === 'localhost' ? 'http://localhost:3000' : baseUrl.origin; // Should match the redirect URI used in the authorization request + baseUrl?.hostname === 'localhost' + ? 'http://localhost:3000' + : 'https://console.opensignlabs.com'; // Should match the redirect URI used in the authorization request const tokenEndpoint = 'https://oauth2.googleapis.com/token'; const params = new URLSearchParams();