Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerKaiser committed Jan 10, 2024
1 parent d674c6f commit 0b84165
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/api/src/api/auth/callback/slack/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,16 @@ export type SlackTokenData = {

export const get = async (req: Request, res: Response) => {
const myCode: string = req.query[codeQueryParam] as string;
const {
clientId: slackClientID,
clientSecret: slackClientSecret,
botToken: slackBotToken,
} = slackAuth;
const { clientId, clientSecret, botToken } = slackAuth;

const returnTo = req.query[Config.global.authReturnUriParamName] as string | undefined;

const client = new WebClient(slackBotToken);
const client = new WebClient(botToken);
try {
const fullToken = await client.openid.connect.token({
code: myCode,
client_id: slackClientID,
client_secret: slackClientSecret,
client_id: clientId,
client_secret: clientSecret,
redirect_uri: formatRedirectUri({ returnTo }),
});

Expand Down

0 comments on commit 0b84165

Please sign in to comment.