d6e-auth-integration

Authenticate users via OAuth2 with two-stage token exchange and HTTP-only cookies.

Updated May 15, 2026
One-click install
npx skills add https://github.com/d6e-ai/d6e-ai-keiri-example --skill d6e-auth-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: d6e-auth-integration
Source: https://github.com/d6e-ai/d6e-ai-keiri-example/tree/main/skills/d6e-auth-integration
Command: npx skills add https://github.com/d6e-ai/d6e-ai-keiri-example --skill d6e-auth-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill solves the problem of securely integrating d6e authentication into a frontend application, providing OAuth2-based authentication and token exchange to enable secure user access to d6e services.

Core Features & Use Cases

  • OAuth2 Authentication: Implements OAuth2 Authorization Code flow for secure user authentication.
  • Two-Stage Token Exchange: Ensures that access tokens are valid for the d6e instance audience.
  • HTTP-only Session Cookies: Protects sensitive session data from XSS attacks.
  • Workspace Allow-list: Ensures that users have access to the correct workspace.
  • Two-Stage Logout: Securely signs out users from both the application and d6e-auth.
  • Use Case: For a SvelteKit app, use this Skill to implement secure OAuth2 authentication with d6e-auth, ensuring that users can log in and access d6e services without encountering 401 errors.

Quick Start

Implement OAuth2 authentication with d6e-auth by adding the required environment variables and configuring the login and callback routes.

Frequently Asked Questions about d6e-auth-integration

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

FAQPage Schema
How do I implement OAuth2 authentication in a SvelteKit application?

You can implement OAuth2 authentication in a SvelteKit application by using the Authorization Code flow. This process requires configuring specific OAuth2 environment variables and setting up dedicated login and callback routes to handle the secure user access workflow.

What is a two-stage token exchange and why is it needed for secure API access?

A two-stage token exchange ensures that OAuth2 access tokens are specifically validated for the correct instance audience. This multi-step validation process guarantees that tokens securely authenticate users and grant appropriate access to designated services.

How do I protect user session data from XSS attacks during OAuth2 session management?

Protect user session data from XSS attacks by storing sensitive tokens in HTTP-only cookies. This configuration prevents client-side scripts from accessing the session data, ensuring that OAuth2 authentication states remain secure.

How do I configure workspace access control to prevent 401 unauthorized errors?

Prevent 401 unauthorized errors by implementing a workspace allow-list to verify user permissions. This ensures that authenticated users are only granted access to their designated workspaces, validating tokens against the correct audience.

Does SvelteKit work with d6e-auth integration for secure OAuth2 login?

Yes, SvelteKit works with d6e-auth integration to implement secure OAuth2 authentication. It supports the required environment variable configuration and route setup to facilitate seamless login and two-stage logout functionality.

Why do I keep getting 401 errors after OAuth2 token exchange?

You get 401 errors after OAuth2 token exchange when the tokens are not valid for the specific instance audience. Performing a two-stage token exchange and enforcing a workspace allow-list ensures tokens are correctly scoped.