File: hubspot.md | Updated: 11/15/2025
š NextAuth.js is now part of Better Auth !
Version: v4
On this page
note
HubSpot returns a limited amount of information on the token holder (see docs ). One other issue is that the name and profile photo cannot be fetched through API as discussed here .
Documentationā
https://developers.hubspot.com/docs/api/oauth-quickstart-guide
Configurationā
You need to have an APP in your Developer Account as described at https://developers.hubspot.com/docs/api/developer-tools-overview
Optionsā
The HubSpot Provider comes with a set of default options:
You can override any of the options to suit your own use case.
Exampleā
import HubspotProvider from "next-auth/providers/hubspot";...providers: [ HubspotProvider({ clientId: process.env.HUBSPOT_CLIENT_ID, clientSecret: process.env.HUBSPOT_CLIENT_SECRET })]...
danger
The Redirect URL under the Auth tab on the HubSpot App Settings page must match the callback url which would be http://localhost:3000/api/auth/callback/hubspot for local development. Only one callback URL per Client ID and Client Secret pair is allowed, so it might be easier to create a new app for local development then fiddle with the url changes.