encore-auth
Installation
SKILL.md
Encore Authentication
Instructions
Encore.ts provides a built-in authentication system for identifying API callers and protecting endpoints.
1. Create an Auth Handler
// auth.ts
import { Header, Gateway } from "encore.dev/api";
import { authHandler } from "encore.dev/auth";
// Define what the auth handler receives
interface AuthParams {
authorization: Header<"Authorization">;
}
// Define what authenticated requests will have access to
Related skills
More from encoredev/skills
encore-service
Structure and organize Encore.ts services.
354encore-api
Create type-safe API endpoints with Encore.ts.
350encore-code-review
Review Encore.ts code for best practices and anti-patterns.
346encore-database
Database queries, migrations, and ORM integration with Encore.ts.
337encore-testing
Test APIs and services with Vitest in Encore.ts.
333encore-infrastructure
Declare databases, Pub/Sub, cron jobs, caching, object storage, and secrets with Encore.ts.
326