better-auth-tauri-setup

Configure cookie-based authentication and deep link OAuth callbacks in Tauri v2 apps.

Updated Jul 18, 2026
One-click install
npx skills add https://github.com/arthrod/conejo-skills --skill better-auth-tauri-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth-tauri-setup
Source: https://github.com/arthrod/conejo-skills/tree/main/skills/better-auth-tauri-setup
Command: npx skills add https://github.com/arthrod/conejo-skills --skill better-auth-tauri-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @daveyplate/better-auth-tauri, @tauri-apps/api, @tauri-apps/plugin-deep-link, @tauri-apps/plugin-http, @tauri-apps/plugin-os, @tauri-apps/plugin-opener, better-auth, and includes references (resource) components.

What problem does it solve?

This skill resolves the complex authentication challenges in Tauri v2 desktop applications, specifically enabling cookie-based sessions and social OAuth flows that require deep-link callbacks.

Core Features & Use Cases

  • Deep Link Integration: Configures OS-level URL schemes to handle OAuth redirects back into the desktop application.
  • Cookie Persistence: Provides the necessary middleware and client-side fetch overrides to ensure authentication state persists across macOS and Windows environments.
  • Use Case: Use this when building a secure desktop application that requires users to sign in via Google or GitHub, ensuring the browser-based OAuth flow correctly returns the user to the Tauri app with an active session.

Quick Start

Use the better-auth-tauri-setup skill to configure the server-side plugin and client-side fetch implementation for my new Tauri v2 project.

Frequently Asked Questions about better-auth-tauri-setup

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

FAQPage Schema
How do I handle OAuth authentication in a Tauri v2 desktop app?

OAuth authentication in a Tauri v2 desktop app is handled by configuring deep link URL schemes to catch browser redirects and using better-auth middleware to persist cookie-based sessions. This ensures the OAuth flow securely returns users to your application with an active session.

How does deep link integration work for Tauri social login callbacks?

Deep link integration for Tauri callbacks works by registering OS-level URL schemes that intercept OAuth redirects from external browsers. When a user authenticates via Google or GitHub, the browser redirects back to the Tauri app using the custom URL scheme to establish the session.

Can I use better-auth with Tauri for persistent cookie sessions on Windows and macOS?

Yes, you can use better-auth with Tauri to achieve persistent cookie sessions on Windows and macOS. The setup requires the @daveyplate/better-auth-tauri plugin alongside client-side fetch overrides to ensure the authentication state persists across both operating systems.

What's the best way to manage browser-to-app redirects for desktop authentication?

The best way to manage browser-to-app redirects for desktop authentication is using deep-link callback schemes combined with HTTP cookie support. This approach securely bridges the gap between external browser OAuth flows and your desktop application's session management.

Do I need specific Tauri plugins to configure deep link schemes for OAuth?

Yes, you need specific Tauri plugins including @tauri-apps/plugin-deep-link, @tauri-apps/plugin-http, and @tauri-apps/plugin-opener to configure deep link schemes. These plugins handle URL interception, HTTP requests, and browser opening for the OAuth flow.

Why are my authentication cookies not persisting in my Tauri desktop application?

Authentication cookies may not persist in a Tauri desktop application if client-side fetch overrides and the @daveyplate/better-auth-tauri plugin are not properly configured. Correct middleware setup is required to ensure session state persists across macOS and Windows environments.