Skip to content

Commit

Permalink
cleanup (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
khaliqgant authored May 5, 2023
1 parent a373fc4 commit 8b17d79
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
16 changes: 12 additions & 4 deletions packages/server/lib/controllers/oauth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ import {
getAccount,
getConnectionMetadataFromTokenResponse
} from '../utils/utils.js';
import { ProviderConfig, ProviderTemplate, ProviderTemplateOAuth2, ProviderAuthModes, OAuthSession, OAuth1RequestTokenResult, AuthCredentials } from '../models.js';
import {
ProviderConfig,
ProviderTemplate,
ProviderTemplateOAuth2,
ProviderAuthModes,
OAuthSession,
OAuth1RequestTokenResult,
AuthCredentials
} from '../models.js';
import logger from '../utils/logger.js';
import type { NextFunction } from 'express';
import errorManager from '../utils/error.manager.js';
Expand Down Expand Up @@ -314,8 +322,8 @@ class OAuthController {
logger.debug(`OAuth 2 for ${providerConfigKey} (connection ${connectionId}) successful.`);

const tokenMetadata = getConnectionMetadataFromTokenResponse(rawCredentials, template);
var parsedRawCredentials : AuthCredentials = connectionService.parseRawCredentials(rawCredentials, ProviderAuthModes.OAuth2);

const parsedRawCredentials: AuthCredentials = connectionService.parseRawCredentials(rawCredentials, ProviderAuthModes.OAuth2);

connectionService.upsertConnection(
connectionId,
Expand Down Expand Up @@ -353,7 +361,7 @@ class OAuthController {
.then((accessTokenResult) => {
logger.debug(`OAuth 1.0a for ${providerConfigKey} (connection: ${connectionId}) successful.`);

let parsedAccessTokenResult = connectionService.parseRawCredentials(accessTokenResult, ProviderAuthModes.OAuth1);
const parsedAccessTokenResult = connectionService.parseRawCredentials(accessTokenResult, ProviderAuthModes.OAuth1);

connectionService.upsertConnection(
connectionId,
Expand Down

0 comments on commit 8b17d79

Please sign in to comment.