# GitHub Projects Community 分享了 react-native-apple-authentication 2.0.0 版本，讓 React Native 跨平台應用程式在 iOS 之外也能完整支援 Android 平台的 Apple 登入功能

> 📖 本站完整內容索引（documentation index）：[llms.txt](/llms.txt)

> 原作者：GitHub Projects Community (@GithubProjects) · 策展與摘要：EasyVibeCoding · 平台：X (Twitter) · 熱度：🔥 · 日期：2026-07-24

> 原始來源：https://x.com/githubprojects/status/2080352301399896087

## 證據與延伸閱讀

- [發布 2.0.0 版本帶來 Android 支援](https://osp.fyi/react-native-apple-authentication)

## 中文摘要

GitHub Projects Community 分享了 react-native-apple-authentication 2.0.0 版本，讓 React Native 跨平台應用程式在 iOS 之外也能完整支援 Android 平台的 Apple 登入功能。

**核心功能與特點**
Invertase 團隊為 `react-native-apple-authentication` 釋出重大更新，不再侷限於 iOS 單一平台，讓開發者在雙平台上享有一致的驗證體驗。
- 提供完整的原生 React Native 模組，處理完整的 OAuth 2.0 流程、憑證狀態管理、使用者偵測與錯誤處理。
- 在 Android 平台上採用安全的 webview 完成驗證並回傳與 iOS 相同的資料結構，無需額外建置後端。
- 具備完整型別安全，並支援所有 AppleButton 變體與自訂按鈕樣式。
- 支援離線運作（iOS 端快取憑證）、Apple 的私人 email 轉發機制，以及跨應用程式的憑證共享。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/8c0b79fc9ecaccb8.jpg)
> 展示一個 React Native 套件的專案說明頁面，內容包含 iOS 裝置模擬器畫面展示 Apple 認證按鈕樣式，以及下載次數、版本號、授權條款與社群連結等徽章資訊。

**快速上手指南**
若要在專案中使用，可透過 npm 安裝套件：

```bash
npm install @invertase/react-native-apple-authentication
```

在 iOS 端需要在 Xcode 中加入「Sign In with Apple」能力（或透過 Expo config plugin），Android 端則需將 Apple 開發者憑證加入 Android 資訊清單（Android manifest）。基本呼叫方式如下：

```ts
import appleAuth, {
  AppleAuthRequestScope,
  AppleAuthRequestOperation,
} from '@invertase/react-native-apple-authentication';

async function handleAppleSignIn() {
  try {
    const appleAuthRequestResponse = await appleAuth.performRequest({
      requestedOperation: AppleAuthRequestOperation.LOGIN,
      requestedScopes: [AppleAuthRequestScope.EMAIL, AppleAuthRequestScope.FULL_NAME],
    });

    const credentialState = await appleAuth.getCredentialStateForUser(appleAuthRequestResponse.user);

    if (credentialState === appleAuth.State.AUTHORIZED) {
      console.log('Apple ID:', appleAuthRequestResponse.user);
      console.log('Email:', appleAuthRequestResponse.email);
      console.log('Full Name:', appleAuthRequestResponse.fullName);
    }
  } catch (error) {
    console.error('Apple Sign-In error:', error);
  }
}
```

更多詳細資訊與範例應用程式可參考 [react-native-apple-authentication 專案說明](https://osp.fyi/react-native-apple-authentication)。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/cf7f4b1886ceba46.png)
> GitHub 專案 `invertase/react-native-apple-authentication` 的簡介頁面，顯示其為提供 iOS 與 Android 上 Apple 驗證支援的 React Native 函式庫，並列出 52 位貢獻者、5k 次使用、2k 星標數與 233 次分支。

## 標籤

框架更新, 開源專案, iOS, Android, GitHub, React Native
