[PR #6163] [CLOSED] feat: hubspot social provider #23392

Closed
opened 2026-04-15 21:41:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6163
Author: @Mi4BT
Created: 11/21/2025
Status: Closed

Base: canaryHead: feat/hubspot-social-provider


📝 Commits (7)

  • 23f98db feat(hubspot): add hubspot provider
  • 40713d9 fix(hubspot): correct bad url
  • f3451ef docs(hubspot): add hubspot provider to demo
  • ace6eec docs(hubspot): add docs for hubspot provider
  • c420ad5 docs(hubspot): correct docs with new developper platform
  • e3dd026 chore(hubspot): enforce order and URL newline
  • 518ba19 Merge branch 'canary' into feat/hubspot-social-provider

📊 Changes

9 files changed (+333 additions, -0 deletions)

View changed files

📝 demo/expo/src/app/index.tsx (+13 -0)
📝 demo/expo/src/lib/auth.ts (+4 -0)
📝 demo/nextjs/components/sign-in.tsx (+24 -0)
📝 demo/nextjs/lib/auth.ts (+5 -0)
📝 demo/stateless/src/lib/auth.ts (+4 -0)
📝 docs/components/sidebar-content.tsx (+18 -0)
docs/content/docs/authentication/hubspot.mdx (+125 -0)
packages/core/src/social-providers/hubspot.ts (+137 -0)
📝 packages/core/src/social-providers/index.ts (+3 -0)

📄 Description

Description

This PR adds a new Hubspot OAuth provider to Better Auth, enabling users to authenticate with Hubspot organizations.

Changes

  • Introduced new hubspot provider in /packages/better-auth/src/providers/hubspot.ts
  • Modified /packages/better-auth/src/providers/index.ts
  • Modified /demo/expo/src/app/index.tsx
  • Modified /demo/expo/src/lib/auth.ts
  • Modified /demo/nextjs/components/sign-in.tsx
  • Modified /demo/nextjs/lib/auth.ts
  • Modified /demo/stateless/src/lib/auth.ts

Notes


Summary by cubic

Adds a HubSpot OAuth provider to Better Auth to support sign-in with HubSpot accounts. Includes core provider, demo wiring, and setup docs.

  • New Features

    • New hubspot() provider with OAuth authorize, token, and user info endpoints; default scope oauth with optional extra scopes.
    • Supports PKCE and refresh token flow; user info maps HubSpot user_id and email.
    • Exported via socialProviders and available to clients.
  • Docs and Examples

    • Added HubSpot sign-in to Next.js and Expo demos; stateless demo config included.
    • New docs page with setup steps and env vars; sidebar link added.

Written for commit 518ba19afe. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/6163 **Author:** [@Mi4BT](https://github.com/Mi4BT) **Created:** 11/21/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `feat/hubspot-social-provider` --- ### 📝 Commits (7) - [`23f98db`](https://github.com/better-auth/better-auth/commit/23f98db8af82999563bc07d45c6fe99767edcf5f) feat(hubspot): add hubspot provider - [`40713d9`](https://github.com/better-auth/better-auth/commit/40713d947306666ddc3a46b924c57db5e5cee5c9) fix(hubspot): correct bad url - [`f3451ef`](https://github.com/better-auth/better-auth/commit/f3451ef17c785b12f308169dd9867d9108a3d770) docs(hubspot): add hubspot provider to demo - [`ace6eec`](https://github.com/better-auth/better-auth/commit/ace6eec1b9172845f7ec0f28ad01311ec97428b5) docs(hubspot): add docs for hubspot provider - [`c420ad5`](https://github.com/better-auth/better-auth/commit/c420ad545b2758f3abfea922122fdfdde0a8bcff) docs(hubspot): correct docs with new developper platform - [`e3dd026`](https://github.com/better-auth/better-auth/commit/e3dd02620c04d997ace19d073a71a69ebbb34df0) chore(hubspot): enforce order and URL newline - [`518ba19`](https://github.com/better-auth/better-auth/commit/518ba19afe553e4b0a3e76ab806fbde9c070bc68) Merge branch 'canary' into feat/hubspot-social-provider ### 📊 Changes **9 files changed** (+333 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `demo/expo/src/app/index.tsx` (+13 -0) 📝 `demo/expo/src/lib/auth.ts` (+4 -0) 📝 `demo/nextjs/components/sign-in.tsx` (+24 -0) 📝 `demo/nextjs/lib/auth.ts` (+5 -0) 📝 `demo/stateless/src/lib/auth.ts` (+4 -0) 📝 `docs/components/sidebar-content.tsx` (+18 -0) ➕ `docs/content/docs/authentication/hubspot.mdx` (+125 -0) ➕ `packages/core/src/social-providers/hubspot.ts` (+137 -0) 📝 `packages/core/src/social-providers/index.ts` (+3 -0) </details> ### 📄 Description # Description This PR adds a new Hubspot OAuth provider to Better Auth, enabling users to authenticate with Hubspot organizations. # Changes - Introduced new hubspot provider in /packages/better-auth/src/providers/hubspot.ts - Modified /packages/better-auth/src/providers/index.ts - Modified /demo/expo/src/app/index.tsx - Modified /demo/expo/src/lib/auth.ts - Modified /demo/nextjs/components/sign-in.tsx - Modified /demo/nextjs/lib/auth.ts - Modified /demo/stateless/src/lib/auth.ts # Notes - Tested with Hubspot Account - Related Issue: #5965 - Implementation follows: [https://developers.hubspot.com/docs/api-reference/auth-oauth-v1/guide#initiating-oauth-access](url) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a HubSpot OAuth provider to Better Auth to support sign-in with HubSpot accounts. Includes core provider, demo wiring, and setup docs. - **New Features** - New hubspot() provider with OAuth authorize, token, and user info endpoints; default scope oauth with optional extra scopes. - Supports PKCE and refresh token flow; user info maps HubSpot user_id and email. - Exported via socialProviders and available to clients. - **Docs and Examples** - Added HubSpot sign-in to Next.js and Expo demos; stateless demo config included. - New docs page with setup steps and env vars; sidebar link added. <sup>Written for commit 518ba19afe553e4b0a3e76ab806fbde9c070bc68. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:41:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#23392