Skip to main content
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]
  }
});

Build docs developers (and LLMs) love