/opt/canhelp/node_modules/better-auth/dist/plugins/generic-oauth/providers
NameSizeModeActions
auth0.d.mts9790644editdlrm
auth0.mjs10840644editdlrm
auth0.mjs.map19460644editdlrm
gumroad.d.mts8640644editdlrm
gumroad.mjs15890644editdlrm
gumroad.mjs.map29580644editdlrm
hubspot.d.mts9550644editdlrm
hubspot.mjs16740644editdlrm
hubspot.mjs.map37940644editdlrm
index.d.mts5140644editdlrm
index.mjs3840644editdlrm
keycloak.d.mts10530644editdlrm
keycloak.mjs11000644editdlrm
keycloak.mjs.map20340644editdlrm
line.d.mts17660644editdlrm
line.mjs25800644editdlrm
line.mjs.map46770644editdlrm
microsoft-entra-id.d.mts10960644editdlrm
microsoft-entra-id.mjs20060644editdlrm
microsoft-entra-id.mjs.map40380644editdlrm
okta.d.mts9900644editdlrm
okta.mjs10560644editdlrm
okta.mjs.map19750644editdlrm
patreon.d.mts8230644editdlrm
patreon.mjs17140644editdlrm
patreon.mjs.map30870644editdlrm
slack.d.mts7990644editdlrm
slack.mjs17190644editdlrm
slack.mjs.map33250644editdlrm
Edit: /opt/canhelp/node_modules/better-auth/dist/plugins/generic-oauth/providers/hubspot.mjs (1674B)
import { betterFetch } from "@better-fetch/fetch"; //#region src/plugins/generic-oauth/providers/hubspot.ts /** * HubSpot OAuth provider helper * * @example * ```ts * import { genericOAuth, hubspot } from "better-auth/plugins/generic-oauth"; * * export const auth = betterAuth({ * plugins: [ * genericOAuth({ * config: [ * hubspot({ * clientId: process.env.HUBSPOT_CLIENT_ID, * clientSecret: process.env.HUBSPOT_CLIENT_SECRET, * scopes: ["oauth", "contacts"], * }), * ], * }), * ], * }); * ``` */ function hubspot(options) { const defaultScopes = ["oauth"]; const getUserInfo = async (tokens) => { const { data: profile, error } = await betterFetch(`https://api.hubapi.com/oauth/v1/access-tokens/${tokens.accessToken}`, { headers: { "Content-Type": "application/json" } }); if (error || !profile) return null; const id = profile.user_id ?? profile.signed_access_token?.userId; if (!id) return null; return { id, name: profile.user, email: profile.user, image: void 0, emailVerified: false }; }; return { providerId: "hubspot", authorizationUrl: "https://app.hubspot.com/oauth/authorize", tokenUrl: "https://api.hubapi.com/oauth/v1/token", clientId: options.clientId, clientSecret: options.clientSecret, scopes: options.scopes ?? defaultScopes, redirectURI: options.redirectURI, authentication: "post", pkce: options.pkce, disableImplicitSignUp: options.disableImplicitSignUp, disableSignUp: options.disableSignUp, overrideUserInfo: options.overrideUserInfo, getUserInfo }; } //#endregion export { hubspot }; //# sourceMappingURL=hubspot.mjs.map