# Auth

This section documents the **auth provider modules** under `providers/auth/`.

They power **Settings → Authentication** in the UI.

They are separate from sync modules and adapters.

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

### What an auth provider does

Each provider handles:

* describing UI fields (`manifest()`)
* running a flow (`start()` → `finish()`)
* persisting credentials into `/config/config.json`

### Where tokens live

Auth providers write into `cfg["<provider>"]` namespaces.

Examples:

* `cfg["plex"]["account_token"]`
* `cfg["trakt"]["access_token"]`, `refresh_token`, `expires_at`
* `cfg["simkl"]["access_token"]`

### Common flows

* **device\_pin**: show PIN → user approves → poll → save token
* **oauth\_code**: open auth URL → exchange code → save token
* **api\_key**: user pastes key → save
* **token**: user pastes token → save

### Gotchas

* “Connected” often means “token exists”, not “token is valid”.
* Switching **HTTP ↔ HTTPS** breaks OAuth redirect URLs.
  * See: [HTTPS/TLS](/crosswatch/navigation/ui-settings/user-interface/https-tls.md)
    {% endtab %}

{% tab title="Power users" %}

### Key files in this section

* [registry](/blueprint-architecture/auth/registry.md)
* [\_auth\_base](/blueprint-architecture/auth/_auth_base.md)

### Provider modules

* [\_auth\_ANILIST](/blueprint-architecture/auth/_auth_anilist.md)
* [\_auth\_EMBY](/blueprint-architecture/auth/_auth_emby.md)
* [\_auth\_JELLYFIN](/blueprint-architecture/auth/_auth_jellyfin.md)
* [\_auth\_MDBLIST](/blueprint-architecture/auth/_auth_mdblist.md)
* [\_auth\_PLEX](/blueprint-architecture/auth/_auth_plex.md)
* [\_auth\_SIMKL](/blueprint-architecture/auth/_auth_simkl.md)
* [\_auth\_TAUTULLI](/blueprint-architecture/auth/_auth_tautulli.md)
* [\_auth\_TMDB](/blueprint-architecture/auth/_auth_tmdb.md)
* [\_auth\_TRAKT](/blueprint-architecture/auth/_auth_trakt.md)
  {% 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.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.
