Skip to content

🔥 The free & Open Source DocuSign alternative

fix: redirect_uri mismatch in googleauth

prafull-opensignlabsed1120927ca8
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();