[PR #8526] docs(integrations): add Capacitor guide #8039

Open
opened 2026-03-13 13:57:48 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8526
Author: @robingenz
Created: 3/9/2026
Status: 🔄 Open

Base: canaryHead: docs/capacitor-integration


📝 Commits (1)

  • 5251cdf docs(integrations): add Capacitor guide

📊 Changes

1 file changed (+232 additions, -0 deletions)

View changed files

docs/content/docs/integrations/capacitor.mdx (+232 -0)

📄 Description

I added a Capacitor integration guide similar to the existing Expo and Lynx guides. Capacitor apps run in a native WebView, so the Better Auth SDK works out of the box without a dedicated package.

The guide covers:

  • Setting up the auth client and configuring trusted origins for Android (https://localhost) and iOS (capacitor://localhost)
  • Email/password authentication (works directly, no plugins needed)
  • Social sign-in via the ID token flow using Capacitor plugins (Apple Sign-In, Google Sign-In, generic OAuth)
  • Session management with examples for React, Vue, and Svelte

Please let me know if I should change anything.


Summary by cubic

Adds a Capacitor integration guide showing how to use the better-auth web client in Capacitor apps. Covers trusted origins and native social sign-in via the ID token flow.

  • New Features
    • New docs page: Integrations → Capacitor (install, createAuthClient, baseURL).
    • Trusted origins: Android https://localhost, iOS capacitor://localhost.
    • Email/password works without plugins; examples included.
    • Social sign-in via idToken with @capawesome/capacitor-apple-sign-in, @capawesome/capacitor-google-sign-in, @capawesome-team/capacitor-oauth.
    • Session examples for React, Vue, and Svelte with authClient.useSession().

Written for commit 5251cdf2a0. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8526 **Author:** [@robingenz](https://github.com/robingenz) **Created:** 3/9/2026 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `docs/capacitor-integration` --- ### 📝 Commits (1) - [`5251cdf`](https://github.com/better-auth/better-auth/commit/5251cdf2a06b6314ba6dbcdde0ebed7b5d79620a) docs(integrations): add Capacitor guide ### 📊 Changes **1 file changed** (+232 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `docs/content/docs/integrations/capacitor.mdx` (+232 -0) </details> ### 📄 Description I added a [Capacitor](https://capacitorjs.com/) integration guide similar to the existing Expo and Lynx guides. Capacitor apps run in a native WebView, so the Better Auth SDK works out of the box without a dedicated package. The guide covers: - Setting up the auth client and configuring trusted origins for Android (`https://localhost`) and iOS (`capacitor://localhost`) - Email/password authentication (works directly, no plugins needed) - Social sign-in via the ID token flow using Capacitor plugins (Apple Sign-In, Google Sign-In, generic OAuth) - Session management with examples for React, Vue, and Svelte Please let me know if I should change anything. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a Capacitor integration guide showing how to use the `better-auth` web client in Capacitor apps. Covers trusted origins and native social sign-in via the ID token flow. - **New Features** - New docs page: Integrations → Capacitor (install, `createAuthClient`, `baseURL`). - Trusted origins: Android `https://localhost`, iOS `capacitor://localhost`. - Email/password works without plugins; examples included. - Social sign-in via `idToken` with `@capawesome/capacitor-apple-sign-in`, `@capawesome/capacitor-google-sign-in`, `@capawesome-team/capacitor-oauth`. - Session examples for React, Vue, and Svelte with `authClient.useSession()`. <sup>Written for commit 5251cdf2a06b6314ba6dbcdde0ebed7b5d79620a. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:57:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8039