Update callback.ts to work with AU location (#16664)
as per https://accounts.zoho.com/oauth/serverinfo, the server location for au is .com.au instead of .au Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
1 parent
2572a5cb93
commit
7ff6d6559a
1 file changed
+10
-1
@@ -51,7 +51,16 @@ async function getHandler(req: NextApiRequest, res: NextApiResponse) {
|
||||
redirect_uri: `${WEBAPP_URL}/api/integrations/${config.slug}/callback`,
|
||||
code,
|
||||
};
|
||||
const server_location = location === "us" ? "com" : location;
|
||||
|
||||
let server_location;
|
||||
|
||||
if (location === "us") {
|
||||
server_location = "com";
|
||||
} else if (location === "au") {
|
||||
server_location = "com.au";
|
||||
} else {
|
||||
server_location = location;
|
||||
}
|
||||
|
||||
const query = stringify(params);
|
||||
|
||||
|
||||
Reference in new issue
Block a user