encore-auth

Automate authentication setup and enforcement for Encore.ts APIs and services.

26|5|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/encoredev/skills --skill encore-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: encore-auth
Source: https://github.com/encoredev/skills/tree/main/encore/auth
Command: npx skills add https://github.com/encoredev/skills --skill encore-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implementing consistent, secure authentication across Encore.ts services, endpoints, and internal calls.

Core Features & Use Cases

  • Auth handler creation with type-safe inputs and outputs
  • Gateway registration to propagate auth data and enforce access control
  • End-to-end examples for protected endpoints and service-to-service calls

Quick Start

Create an auth handler and attach it to a Gateway, then protect endpoints with auth: true.

Frequently Asked Questions about encore-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add authentication to my Encore.ts API endpoints?

To add authentication to Encore.ts APIs, you define an authHandler and attach it to a Gateway, then protect specific REST endpoints by setting the auth parameter to true in their definitions.

Can I enforce access control on internal service-to-service calls in Encore.ts?

Yes, Encore.ts access control can be enforced on internal service calls. The auth setup provides usage patterns that propagate auth data across services and protect internal service-to-service communication alongside gateway-protected resources.

What is a Gateway used for in Encore.ts authentication?

A Gateway in Encore.ts authentication is used to register your authHandler, propagate authentication data across incoming requests, and enforce access control uniformly across protected API resources.

Does Encore.ts support type-safe authentication handlers?

Yes, Encore.ts supports type-safe authentication handlers. The authHandler definition allows you to specify type-safe inputs and outputs for parsing and validating user credentials and auth tokens within your TypeScript backend.

Why do I need an authHandler for my Encore.ts backend?

You need an authHandler to solve the problem of implementing consistent, secure authentication. It centralizes the logic for verifying tokens and applies it uniformly across all Encore.ts services, endpoints, and internal calls.