encore-auth

Implement authentication workflows for Encore.ts services with JWT, API key, and cookie patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Ottric/LINE-DEV-LAB-V2 --skill encore-auth-ottric
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: encore-auth
Source: https://github.com/Ottric/LINE-DEV-LAB-V2/tree/main/apps/services/.agents/skills/encore-auth
Command: npx skills add https://github.com/Ottric/LINE-DEV-LAB-V2 --skill encore-auth-ottric

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Encore.ts provides a built-in authentication system for identifying API callers and protecting endpoints.

Core Features & Use Cases

  • Auth handler creation and registration with a Gateway
  • Access to authenticated data in endpoints via getAuthData
  • Service-to-service auth data propagation across internal calls and support for multiple patterns

Quick Start

Register an authHandler with a Gateway and apply auth to protected endpoints to enable secure, authenticated requests.

Frequently Asked Questions about encore-auth

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

FAQPage Schema
How do I authenticate API callers in Encore.ts?

To authenticate API callers in Encore.ts, you create an auth handler, wire it to a Gateway, and use getAuthData within endpoints to access user identity data for protected requests.

How does service-to-service authentication work in Encore.ts?

Service-to-service authentication in Encore.ts automatically propagates auth data across internal calls, allowing downstream services to securely access the original caller's identity without re-authenticating the request.

Can I use JWT and API keys for Encore endpoint authentication?

Yes, you can secure Encore endpoints using JWT, API key, and cookie-based authentication patterns. The auth handler validates these tokens to identify callers before routing requests to protected endpoints.

What is the best way to protect Encore.ts endpoints from unauthorized access?

The best way to protect Encore.ts endpoints is registering an authHandler with a Gateway to intercept requests, validate caller credentials, and apply authentication rules before routing to protected endpoints.

How do I access authenticated user data inside an Encore.ts endpoint?

You access authenticated user data inside Encore.ts endpoints by calling the built-in getAuthData function, which retrieves the parsed identity information validated by your Gateway's auth handler.