Files
netris-nestri/infra/auth.ts
Wanjohi 7ecc068466 feat(infra): Use a shared VPC (#218)
## Description
The scope of this PR is to add a shared VPC for everyone on the team.
2025-03-26 06:29:25 +03:00

46 lines
1.0 KiB
TypeScript

import { vpc } from "./vpc";
import { bus } from "./bus";
import { domain } from "./dns";
// import { email } from "./email";
import { secret } from "./secret";
import { postgres } from "./postgres";
export const authFingerprintKey = new random.RandomString(
"AuthFingerprintKey",
{
length: 32,
},
);
export const auth = new sst.aws.Auth("Auth", {
issuer: {
vpc,
timeout: "3 minutes",
handler: "packages/functions/src/auth.handler",
link: [
bus,
// email,
postgres,
authFingerprintKey,
secret.PolarSecret,
secret.GithubClientID,
secret.DiscordClientID,
secret.GithubClientSecret,
secret.DiscordClientSecret,
],
permissions: [
{
actions: ["ses:SendEmail"],
resources: ["*"],
},
],
},
domain: {
name: "auth." + domain,
dns: sst.cloudflare.dns(),
},
})
export const outputs = {
auth: auth.url,
};