MCPcopy
hub / github.com/Peppermint-Lab/peppermint / getOAuthClient

Function getOAuthClient

apps/api/src/lib/utils/oauth_client.ts:8–23  ·  view source on GitHub ↗
(providerConfig: any)

Source from the content-addressed store, hash-verified

6const oauthClients = {};
7
8export function getOAuthClient(providerConfig: any) {
9 const { name } = providerConfig;
10 if (!oauthClients[name]) {
11 oauthClients[name] = new AuthorizationCode({
12 client: {
13 id: providerConfig.clientId,
14 secret: providerConfig.clientSecret,
15 },
16 auth: {
17 tokenHost: providerConfig.tokenUrl,
18 authorizeHost: providerConfig.authorizationUrl,
19 },
20 });
21 }
22 return oauthClients[name];
23}
24

Callers 1

authRoutesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected