File: trakt.md | Updated: 11/15/2025
š NextAuth.js is now part of Better Auth !
Version: v4
On this page
Documentationā
https://trakt.docs.apiary.io/#reference/authentication-oauth
Configurationā
If you're using the api in production by calling api.trakt.tv . Follow the example below. If you wish to develop on Trakt's sandbox environment by calling api-staging.trakt.tv . Use the default options with the changed the URLs.
Start by creating an OAuth app on Trakt for production
or development
. Then set the Client ID and Client Secret as TRAKT_ID and TRAKT_SECRET in .env.
Optionsā
The Trakt Provider comes with a set of default options:
You can override any of the options to suit your own use case.
Exampleā
providers: [ TraktProvider({ clientId: process.env.TRAKT_ID, clientSecret: process.env.TRAKT_SECRET, }),]
danger
Trakt does not allow hotlinking images. Even the authenticated user's profie picture.
danger
Trakt does not supply the authenticated user's email.