# \_auth\_TRAKT

Trakt authentication provider (PIN / device flow).

{% tabs %}
{% tab title="End users" %}

### What this auth provider does

Connects CrossWatch to Trakt via a PIN authorization.

### Auth flow

* `device_pin`

### Writes to config

Namespaces referenced:

* `cfg["trakt"]`
* `cfg["auth"]` (legacy/compat paths)

Common fields:

* `client_id`, `client_secret`
* `access_token`, `refresh_token`, `expires_at`

### Related docs

* UI setup: [Auth: Trakt](/crosswatch/providers/authentication/auth-trackers/auth-trakt.md)
* Adapter: [Adapter: Trakt](/crosswatch/providers/synchronization/adapter-trakt.md)
* Sync module: [Trakt module](/blueprint-architecture/sync/_mod_trakt.md)

### Gotchas

* App permissions must include scrobble if using Watcher.
* Popup blockers can prevent the auth tab from opening.
  {% endtab %}

{% tab title="Power users" %}

### Code map

* `providers/auth/_auth_TRAKT.py`

### Public surface

* functions: `log()`, `html()`

### External endpoints

* `https://trakt.tv/activate`
* `https://api.trakt.tv`

### Dependencies

* `cw_platform.config_base.load_config`
* `cw_platform.config_base.save_config`
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.crosswatch.app/blueprint-architecture/auth/_auth_trakt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
