elysia-betterauth-oauth

Implement OAuth 2.1 PKCE authentication for native clients via BetterAuth and Elysia API.

Updated Oct 8, 2025
One-click install
npx skills add https://github.com/ichabodcole/project-docs-scaffold-template --skill elysia-betterauth-oauth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elysia-betterauth-oauth
Source: https://github.com/ichabodcole/project-docs-scaffold-template/tree/main/plugins/recipes/skills/elysia-betterauth-oauth
Command: npx skills add https://github.com/ichabodcole/project-docs-scaffold-template --skill elysia-betterauth-oauth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable OAuth 2.1 PKCE-based authentication for native desktop/mobile clients backed by a BetterAuth + Elysia API, allowing browser-based sign-in and token-based sessions instead of password-based flows.

Core Features & Use Cases

  • Provides an OAuth provider plugin that supports authorization_code flow with PKCE for desktop and mobile apps.
  • Includes a loopback redirect server to securely deliver authorization codes to native clients.
  • Offers early-second-factor-friendly flows with first-party client configurations and skip-consent where appropriate.

Quick Start

Follow the on-screen prompts to complete the desktop OAuth PKCE flow and obtain tokens.

Frequently Asked Questions about elysia-betterauth-oauth

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

FAQPage Schema
How do I implement OAuth 2.1 PKCE authentication for a native desktop app?

You implement OAuth 2.1 PKCE for native desktop apps by using an authorization_code flow with a loopback redirect server, securely delivering authorization codes back to the native client.

What is the best way to add browser-based sign-in to an Electron or Tauri application?

Browser-based sign-in for Electron or Tauri apps is achieved by using a BetterAuth and Elysia API backend to handle OAuth flows, providing token-based sessions instead of password-based authentication.

Does BetterAuth support OAuth provider flows with refresh tokens for mobile clients?

Yes, BetterAuth supports acting as an OAuth provider with a PKCE-based authorization_code flow, issuing token-based sessions that include refresh tokens for desktop and mobile clients.

How do I set up a loopback callback server for OAuth authorization codes?

A loopback callback server is set up as part of the OAuth provider flow to intercept browser redirects and securely pass the authorization codes back to your native desktop or mobile application.

Can I use Elysia to build an OAuth provider with PKCE and skip-consent for first-party clients?

Yes, you can configure an Elysia and BetterAuth OAuth provider to support first-party client configurations, enabling early-second-factor-friendly flows with skip-consent where appropriate.

Does this OAuth PKCE flow support issuing JWT tokens for PowerSync integration?

Yes, the OAuth 2.1 PKCE flow includes optional PowerSync JWT support, allowing you to issue the necessary JSON Web Tokens for PowerSync integration alongside standard session and refresh tokens.