agentsclimarketplace

Riligar dev auth elysia

Skill riligar/agents-kit/.agent/skills/riligar-dev-auth-elysia

RiLiGar Agents Kit - Curated collection of AI Agent templates, skills, and rules designed to standardize and supercharge your AI-driven development workflows.

Install
npx -y skills add riligar/agents-kit --skill riligar-dev-auth-elysia

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Comprehensive guide for integrating the Riligar Auth Elysia SDK into backend servers. Use when a user needs to: (1) Set up a backend auth plugin, (2) Configure Elysia with Riligar Secret Key, (3) Protect API routes or groups, (4) Access authenticated user data in handlers, (5) Perform manual JWT verification.

SKILL.md

2.5 KB, as published. Nobody here has run it

Riligar Auth Elysia Skill

This skill provides a backend workflow for integrating authentication and permissions using the @riligar/auth-elysia SDK.

Core Integration Workflow

1. Installation

Install the backend SDK:

bun add @riligar/auth-elysia

2. Environment Variables

Set up your Secret Key and URLs in your environment files.

[!CAUTION] Backend integration requires the Secret Key (sk_...). Never share this key or include it in client-side code.

# .env.development
AUTH_API_URL=https://manager.myauth.click
AUTH_API_SECRET=sk_test_your_secret_key
AUTH_JWKS_URL=https://manager.myauth.click/.well-known/jwks.json

# .env.production
AUTH_API_URL=https://manager.myauth.click
AUTH_API_SECRET=sk_live_your_secret_key
AUTH_JWKS_URL=https://manager.myauth.click/.well-known/jwks.json

3. Plugin Registration

Add the authPlugin to your Elysia instance.

import { Elysia } from 'elysia'
import { authPlugin } from '@riligar/auth-elysia'

const app = new Elysia()
    .use(
        authPlugin({
            apiUrl: process.env.AUTH_API_URL,
            apiKey: process.env.AUTH_API_SECRET,
            jwksUrl: process.env.AUTH_JWKS_URL,
        })
    )
    .listen(3000)

For more patterns, see server-snippets.js.

Specialized Guides

Common Tasks

Protecting a Route Group

Use onBeforeHandle to secure multiple endpoints efficiently.

app.group('/api/v1', app => app.onBeforeHandle(requireAuth).get('/data', () => ({ ok: true })))

Accessing User Profile

Access the decoded user data directly from the context.

app.get('/profile', ({ user }) => {
    return { id: user.id, email: user.email }
})

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.