Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
Getting Started
Providers
Hubspot

Hubspot Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/hubspot

Environment Variables

AUTH_HUBSPOT_ID
AUTH_HUBSPOT_SECRET

Configuration

/auth.ts
import NextAuth from "next-auth"
import Hubspot from "next-auth/providers/hubspot"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [Hubspot],
})

Notes

  • 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.
Auth.js © Balázs Orbán and Team - 2024