Skip to content

Commit ed11209

Browse files
fix: redirect_uri mismatch in googleauth
1 parent eddf70f commit ed11209

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/OpenSignServer/cloud/customRoute/googleauth.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export default async function gooogleauth(request, response) {
1717
const clientId = process.env.GOOGLE_CLIENT_ID;
1818
const clientSecret = process.env.GOOGLE_CLIENT_SECRET;
1919
const redirectUri =
20-
baseUrl?.hostname === 'localhost' ? 'http://localhost:3000' : baseUrl.origin; // Should match the redirect URI used in the authorization request
20+
baseUrl?.hostname === 'localhost'
21+
? 'http://localhost:3000'
22+
: 'https://console.opensignlabs.com'; // Should match the redirect URI used in the authorization request
2123
const tokenEndpoint = 'https://oauth2.googleapis.com/token';
2224

2325
const params = new URLSearchParams();

0 commit comments

Comments
 (0)