Skip to content
Migrating from NextAuth.js v4? Read our migration guide.

Bitbucket Provider

Resources

Setup

Callback URL

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

Environment Variables

.env.local
AUTH_BITBUCKET_ID
AUTH_BITBUCKET_SECRET

Configuration

@/auth.ts
import NextAuth from "next-auth"
import Bitbucket from "next-auth/providers/bitbucket"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [Bitbucket],
})
Auth.js © Balázs Orbán and Team - 2025