Documentation on how to configure and use AI Warp's authentication.
Configuring authentication can be done via your Platformatic config file under the auth
object. E.g.
// platformatic.json
{
"auth": {
// ...
}
}
We utilize fastify-user to do authentication, so you
can pass in any configuration options for it in the auth
object.
AI Warp-specific options:
required
(boolean
) - If true, any unauthenticated users will receive a 401 status code and body.
This makes authentication required and accepts JWTs signed with the secret abc123
:
{
"auth": {
"required": true,
"jwt": {
"secret": "abc123"
}
}
}
By default, fastify-user reads the Authorization
header.
You can configure AI Warp to read the token from cookies in your Platformatic config:
{
"auth": {
"jwt": {
"cookie": {
"cookieName": "token",
"signed": false
}
}
}
}