Plasma
Core concepts

Authentication

Managing authentication headers

All routes are protected by default. The client verifies that an Authorization header is present after request interceptors run.

// Protected (default) — interceptors must attach the Authorization header
const [, ] = await .('get-users')

// Public — skips the Authorization check entirely
const [, ] = await .('login', , { : false })

[!CAUTION] If auth is true (the default) and no Authorization header is present after interceptors run, the client throws synchronously — it does not return an error tuple.