> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skyvexsoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ctx.auth

> Read-only authentication state from a background module.

`ctx.auth` (`PluginAuthAccessor`) gives read-only access to the current authentication state.

```ts theme={null}
const isAuth = await ctx.auth.isAuthenticated();
const token = await ctx.auth.getToken(); // string | null
```

**When to use it:** to check whether a pilot is signed in before doing work. For HTTP calls to the VA, **don't** build requests from `getToken()` by hand — prefer [`ctx.airline.createClient()`](/sdk/background/context/airline), which adds refresh-on-401 handling that `ctx.auth` does not.
