Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnereese committed Sep 9, 2024
2 parents 91867ab + 1f53e06 commit 565ac92
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ async function onOAuthCallback({ platform, hostname, tokenUrl, callbackUri, apiU
const platformModule = require(`../adapters/${platform}`);
const oauthInfo = await platformModule.getOauthInfo({ tokenUrl, hostname, rcAccountId: query.rcAccountId });

if (!!oauthInfo.failMessage) {
return {
userInfo: null,
returnMessage: {
messageType: 'danger',
message: oauthInfo.failMessage
}
}
}

// Some platforms require different oauth queries, this won't affect normal OAuth process unless CRM module implements getOverridingOAuthOption() method
let overridingOAuthOption = null;
if (platformModule.getOverridingOAuthOption != null) {
Expand Down

0 comments on commit 565ac92

Please sign in to comment.