Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/anomalyco/sst/llms.txt

Use this file to discover all available pages before exploring further.

The Auth component lets you add authentication to your app using Amazon Cognito.

Constructor

sst.config.ts
const auth = new sst.aws.Auth("MyAuth");

Parameters

authenticator

authenticator
object
required
Configure the authenticator for handling authentication logic.
{
  authenticator: {
    handler: "src/auth.handler"
  }
}

Properties

url

Examples

Create an auth component

sst.config.ts
const auth = new sst.aws.Auth("MyAuth", {
  authenticator: {
    handler: "src/auth.handler",
    link: [database]
  }
});