Skip to content

Add Custom Auth SSR component - #6956

Open
vitorfigmgs wants to merge 3 commits into
anomalyco:devfrom
vitorfigmgs:feat/add-custom-auth
Open

Add Custom Auth SSR component#6956
vitorfigmgs wants to merge 3 commits into
anomalyco:devfrom
vitorfigmgs:feat/add-custom-auth

Conversation

@vitorfigmgs

@vitorfigmgs vitorfigmgs commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Related PR

This PR is designed to work with the custom Auth UI feature introduced in OpenAuth:


Overview

This PR introduces the sst.aws.CustomAuth component to support fully customizable Auth UIs using vite powerered modern frontend UI libraries like React .

It allows developers to build their own authentication screens using @openauthjs/vite, deploy the compiled server to AWS Lambda, and run it locally with full HMR alongside their SST app.

Usage

Configure the component in your sst.config.ts by pointing it to your auth package directory.

Note: You currently must specify the dev.url manually, as SST cannot auto-detect the dev host yet.

export const auth = new sst.aws.CustomAuth("MyAuth", {
  path: "packages/auth",
  dev: {
    url: "http://localhost:5174" // Always remember to set this for local dev
  },
});

// Link it to your frontend or API
const web = new sst.aws.Nextjs("MyWeb", {
  link: [auth]
});

@vitorfigmgs vitorfigmgs changed the title feat(custom-auth): Add custom auth ssr component Add Custom Auth SSR component Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant