mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 16:55:37 +02:00
## Description <!-- Briefly describe the purpose and scope of your changes --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced serverless API and authentication endpoints, improving scalability and reliability. - Added rate limiting to the API, providing protection against excessive requests and returning custom error responses. - **Improvements** - Simplified infrastructure for both API and authentication, reducing complexity and improving maintainability. - Updated resource allocations for backend services to optimize performance and cost. - **Bug Fixes** - Removed unused scripts and configuration, resulting in a cleaner development environment. - **Other** - Updated type declarations to reflect new infrastructure changes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
32 lines
816 B
TypeScript
32 lines
816 B
TypeScript
import { bus } from "./bus";
|
|
import { vpc } from "./vpc";
|
|
import { domain } from "./dns";
|
|
import { secret } from "./secret";
|
|
import { postgres } from "./postgres";
|
|
|
|
export const auth = new sst.aws.Auth("Auth", {
|
|
authorizer: {
|
|
vpc,
|
|
link: [
|
|
bus,
|
|
postgres,
|
|
secret.PolarSecret,
|
|
secret.GithubClientID,
|
|
secret.DiscordClientID,
|
|
secret.GithubClientSecret,
|
|
secret.DiscordClientSecret,
|
|
],
|
|
permissions: [
|
|
{
|
|
actions: ["ses:SendEmail"],
|
|
resources: ["*"],
|
|
},
|
|
],
|
|
handler: "packages/functions/src/auth/index.handler",
|
|
},
|
|
domain: {
|
|
name: "auth." + domain,
|
|
dns: sst.cloudflare.dns(),
|
|
},
|
|
forceUpgrade: "v2",
|
|
}); |