Skip to main content


Built-in Trakt integration.


default<P>(options): OAuthConfig< P >

Add Trakt login to your page.


Callback URL​


import Auth from "@auth/core"
import Trakt from "@auth/core/providers/trakt"

const request = new Request(origin)
const response = await Auth(request, {
providers: [Trakt({ clientId: TRAKT_CLIENT_ID, clientSecret: TRAKT_CLIENT_SECRET })],


If you're using the api in production by calling Follow the example. If you wish to develop on Trakt's sandbox environment by calling, change 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.


By default, Auth.js assumes that the Trakt provider is based on the OAuth 2 specification.

  • Trakt does not allow hotlinking images. Even the authenticated user's profie picture.
  • Trakt does not supply the authenticated user's email.

The Trakt provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.


If you think you found a bug in the default configuration, you can open an issue.

Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.

Type parameters​

β–ͺ P extends TraktUser


β–ͺ options: OAuthUserConfig< P >


OAuthConfig< P >