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

Trakt Provider

Resources

Setup

Callback URL

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

Environment Variables

AUTH_TRAKT_ID
AUTH_TRAKT_SECRET

Configuration

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

Notes

  • If you’re using the api in production by calling api.trakt.tv. Follow the example. If you wish to develop on Trakt’s sandbox environment by calling api-staging.trakt.tv, change the URLs.
  • Trakt does not allow hotlinking images. Even the authenticated user’s profie picture.
  • Trakt does not supply the authenticated user’s email.
Auth.js © Balázs Orbán and Team - 2024