---
description: Capacitor plugin to sign in users with their Facebook account on Android, iOS, and the Web, including Limited Login and access token retrieval.
title: Capacitor Facebook Sign-In Plugin - Capawesome
image: https://capawesome.io/docs/assets/images/social/sdks/capacitor/facebook-sign-in.png
---

<!doctype html> 

[Skip to content ](#capacitor-facebook-sign-in-plugin) 

[📲 Introducing **Build Sharing** — get your builds onto testers' devices with a link & QR code. No account required. ](/blog/share-mobile-app-builds-with-testers/) 

* [ SDKs ](/docs/sdks/)
* [ iOS ](#ios)
* [ Configuration ](#configuration)
* [ Usage ](#usage)
* [ API ](#api)
* [ Limited Login ](#limited-login)
* [ Security ](#security)
* [ FAQ ](#faq)
* [ Related Plugins ](#related-plugins)
* [ Newsletter ](#newsletter)
* [ Changelog ](#changelog)
* [ License ](#license)
* [ File Compressor ](/docs/sdks/capacitor/file-compressor/)
* [ File Opener ](/docs/sdks/capacitor/file-opener/)
* [ File Picker ](/docs/sdks/capacitor/file-picker/)
* [ Firebase ](/docs/sdks/capacitor/firebase/)
* [ Formbricks ](/docs/sdks/capacitor/formbricks/)
* [ Geocoder ](/docs/sdks/capacitor/geocoder/)
* [ Google Sign-In ](/docs/sdks/capacitor/google-sign-in/)
* [ Grafana Faro ](/docs/sdks/capacitor/grafana-faro/)
* [ Gyroscope ](/docs/sdks/capacitor/gyroscope/)
* [ Haptics ](/docs/sdks/capacitor/haptics/)
* [ Home Indicator ](/docs/sdks/capacitor/home-indicator/)
* [ In-App Browser ](/docs/sdks/capacitor/in-app-browser/)
* [ Install Referrer ](/docs/sdks/capacitor/install-referrer/)
* [ Intercom ](/docs/sdks/capacitor/intercom/)
* [ Intune ](/docs/sdks/capacitor/intune/)
* [ Keep Awake ](/docs/sdks/capacitor/keep-awake/)
* [ libSQL ](/docs/sdks/capacitor/libsql/)
* [ Light Sensor ](/docs/sdks/capacitor/light-sensor/)
* [ Live Update ](/docs/sdks/capacitor/live-update/)
* [ Localization ](/docs/sdks/capacitor/localization/)
* [ Mail Composer ](/docs/sdks/capacitor/mail-composer/)
* [ Managed Configurations ](/docs/sdks/capacitor/managed-configurations/)
* [ Maps Launcher ](/docs/sdks/capacitor/maps-launcher/)
* [ Media Session ](/docs/sdks/capacitor/media-session/)
* [ ML Kit ](/docs/sdks/capacitor/mlkit/)
* [ Navigation Bar ](/docs/sdks/capacitor/navigation-bar/)
* [ Network ](/docs/sdks/capacitor/network/)
* [ NFC ](/docs/sdks/capacitor/nfc/)
* [ Node.js ](/docs/sdks/capacitor/nodejs/)
* [ OAuth ](/docs/sdks/capacitor/oauth/)
* [ Passkeys ](/docs/sdks/capacitor/passkeys/)
* [ Password Autofill ](/docs/sdks/capacitor/password-autofill/)
* [ PDF Generator ](/docs/sdks/capacitor/pdf-generator/)
* [ PDF Viewer ](/docs/sdks/capacitor/pdf-viewer/)
* [ Pedometer ](/docs/sdks/capacitor/pedometer/)
* [ Permissions ](/docs/sdks/capacitor/permissions/)
* [ Phone Dialer ](/docs/sdks/capacitor/phone-dialer/)
* [ Photo Editor ](/docs/sdks/capacitor/photo-editor/)
* [ Photo Manipulator ](/docs/sdks/capacitor/photo-manipulator/)
* [ PixLive ](/docs/sdks/capacitor/pixlive/)
* [ PostHog ](/docs/sdks/capacitor/posthog/)
* [ Printer ](/docs/sdks/capacitor/printer/)
* [ Privacy Screen ](/docs/sdks/capacitor/privacy-screen/)
* [ Proximity Sensor ](/docs/sdks/capacitor/proximity-sensor/)
* [ Purchases ](/docs/sdks/capacitor/purchases/)
* [ RealtimeKit ](/docs/sdks/capacitor/realtimekit/)
* [ Root Detection ](/docs/sdks/capacitor/root-detection/)
* [ Screen Brightness ](/docs/sdks/capacitor/screen-brightness/)
* [ Screen Orientation ](/docs/sdks/capacitor/screen-orientation/)
* [ Screen Reader ](/docs/sdks/capacitor/screen-reader/)
* [ Screenshot ](/docs/sdks/capacitor/screenshot/)
* [ Secure Preferences ](/docs/sdks/capacitor/secure-preferences/)
* [ Settings Launcher ](/docs/sdks/capacitor/settings-launcher/)
* [ Shake ](/docs/sdks/capacitor/shake/)
* [ Silent Mode ](/docs/sdks/capacitor/silent-mode/)
* [ SIM ](/docs/sdks/capacitor/sim/)
* [ SMS Composer ](/docs/sdks/capacitor/sms-composer/)
* [ Speech Recognition ](/docs/sdks/capacitor/speech-recognition/)
* [ Speech Synthesis ](/docs/sdks/capacitor/speech-synthesis/)
* [ Share Target ](/docs/sdks/capacitor/share-target/)
* [ Square Mobile Payments ](/docs/sdks/capacitor/square-mobile-payments/)
* [ SQLite ](/docs/sdks/capacitor/sqlite/)
* [ Superwall ](/docs/sdks/capacitor/superwall/)
* [ System WebView ](/docs/sdks/capacitor/system-webview/)
* [ Tauri ](/docs/sdks/capacitor/tauri/)
* [ Text Interaction ](/docs/sdks/capacitor/text-interaction/)
* [ Text Zoom ](/docs/sdks/capacitor/text-zoom/)
* [ Thermal State ](/docs/sdks/capacitor/thermal-state/)
* [ Toast ](/docs/sdks/capacitor/toast/)
* [ Torch ](/docs/sdks/capacitor/torch/)
* [ Vault ](/docs/sdks/capacitor/vault/)
* [ Volume ](/docs/sdks/capacitor/volume/)
* [ Wallet ](/docs/sdks/capacitor/wallet/)
* [ Wifi ](/docs/sdks/capacitor/wifi/)
* [ YouTube Player ](/docs/sdks/capacitor/youtube-player/)
* [ Zip ](/docs/sdks/capacitor/zip/)
* [ Cordova ](/docs/sdks/cordova/)
* [ Cloud ](/docs/cloud/)
* [ Integrations ](/docs/cloud/live-updates/integrations/)
* Concepts
* Reference
* [ Troubleshooting ](/docs/cloud/live-updates/troubleshooting/)
* [ FAQ ](/docs/cloud/live-updates/faq/)
* [ Native Builds ](/docs/cloud/native-builds/)
* [ Set Up Environments ](/docs/cloud/native-builds/environments/)
* [ Overwrite Native Configurations ](/docs/cloud/native-builds/native-configurations/)
* [ Auto-Increment Build Numbers ](/docs/cloud/native-builds/auto-incrementing-build-numbers/)
* [ Configure the Web Build Script ](/docs/cloud/native-builds/web-build-script/)
* [ Build from a Monorepo ](/docs/cloud/native-builds/monorepo/)
* [ Use pnpm, Yarn, or bun ](/docs/cloud/native-builds/package-managers/)
* [ Install Private npm Packages ](/docs/cloud/native-builds/npm-private-registry/)
* [ Override the Java Version ](/docs/cloud/native-builds/override-java-version/)
* [ Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/custom-ios-provisioning-profiles/)
* [ Build without Git ](/docs/cloud/native-builds/build-without-git/)
* [ Access Git Behind a Firewall ](/docs/cloud/native-builds/firewall-access/)
* [ Integrations ](/docs/cloud/native-builds/integrations/)
* Reference
* [ Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [ FAQ ](/docs/cloud/native-builds/faq/)
* [ App Store Publishing ](/docs/cloud/app-store-publishing/)
* [ Submit a Build ](/docs/cloud/app-store-publishing/submit-a-build/)
* [ Submit Automatically After a Build ](/docs/cloud/app-store-publishing/submit-automatically/)
* [ Troubleshooting ](/docs/cloud/app-store-publishing/troubleshooting/)
* [ FAQ ](/docs/cloud/app-store-publishing/faq/)
* [ Automations ](/docs/cloud/automations/)
* [ Reference ](/docs/cloud/automations/reference/)
* [ Troubleshooting ](/docs/cloud/automations/troubleshooting/)
* [ FAQ ](/docs/cloud/automations/faq/)
* [ Assist ](/docs/cloud/assist/)
* [ CLI ](/docs/cloud/cli/)
* APIs and SDKs
* [ Webhooks ](/docs/cloud/webhooks/)
* [ Integrations ](/docs/cloud/integrations/)
* Notifications
* Account
* [ Organization ](/docs/cloud/organizations/)
* [ Two-Factor Enforcement ](/docs/cloud/organizations/two-factor-authentication/)
* [ Audit Logs ](/docs/cloud/organizations/audit-logs/)
* [ Billing ](/docs/cloud/organizations/billing/)
* [ License Keys ](/docs/cloud/license-keys/)
* [ AI ](/docs/ai/)
* [ Insiders ](/docs/insiders/)
* [ Billing & Plans ](/docs/insiders/billing-and-plans/)
* [ FAQ ](/docs/insiders/faq/)
* [ License ](https://capawesome.io/legal/eula/)
* [ Support ](/docs/support/)
* [ Contributing ](/docs/contributing/)
* Contributing code
* [ Code of Conduct ](/docs/contributing/code-of-conduct/)
* [ Questions ](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#creating-a-discussion)
* [ Blog ](/blog/)
* Categories

* [ iOS ](#ios)
* [ Configuration ](#configuration)
* [ Usage ](#usage)
* [ API ](#api)
* [ Limited Login ](#limited-login)
* [ Security ](#security)
* [ FAQ ](#faq)
* [ Related Plugins ](#related-plugins)
* [ Newsletter ](#newsletter)
* [ Changelog ](#changelog)
* [ License ](#license)

# Capacitor Facebook Sign-In Plugin[¶](#capacitor-facebook-sign-in-plugin "Permanent link")

Unofficial Capacitor plugin to sign-in with Facebook.[1](#fn:1)

[ ![Deliver Live Updates to your Capacitor app with Capawesome Cloud](../../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](https://cloud.capawesome.io/) 

## Features[¶](#features "Permanent link")

The Capacitor Facebook Sign-In plugin is a comprehensive Facebook authentication solution for Capacitor apps. Here are some of the key features:

* 🖥️ **Cross-platform**: Supports Android, iOS, and Web.
* 🔐 **Authentication**: Sign in users with their Facebook account.
* 🔑 **Access Token**: Retrieve the access token for the Facebook Graph API.
* 👤 **User Profile**: Retrieve the user's email, display name, profile picture, and more.
* 🕵️ **Limited Login**: Support for Limited Login on iOS to sign in users without tracking.
* 🛡️ **Nonce Support**: Prevent replay attacks with a custom nonce on iOS.
* 🪶 **Lightweight**: Just a single dependency and zero unnecessary bloat.
* 🚨 **Error Codes**: Provides detailed error codes for better error handling.
* 🤝 **Compatibility**: Works alongside the [Apple Sign-In](https://capawesome.io/docs/sdks/capacitor/apple-sign-in/) and [Google Sign-In](https://capawesome.io/docs/sdks/capacitor/google-sign-in/) plugins.
* 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.
* 🔁 **Up-to-date**: Always supports the latest Capacitor version.

Missing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!

## Use Cases[¶](#use-cases "Permanent link")

The Facebook Sign-In plugin is typically used wherever users should sign in with their existing Facebook account, for example:

* **Social login**: Let users sign in to your app with their Facebook account instead of creating a new password.
* **Backend authentication**: Send the authentication token (JWT) to your backend to verify the user's identity.
* **Graph API access**: Use the access token to request data from the Facebook Graph API on behalf of the user.
* **Privacy-friendly sign-in on iOS**: Use Limited Login to sign in users without tracking and without App Tracking Transparency consent.
* **Profile pre-filling**: Use the user's email, display name, and profile picture to pre-fill their profile in your app.

## Compatibility[¶](#compatibility "Permanent link")

| Plugin Version | Capacitor Version | Status         |
| -------------- | ----------------- | -------------- |
| 0.1.x          | \>=8.x.x          | Active support |

## Installation[¶](#installation "Permanent link")

You can use our **AI-Assisted Setup** to install the plugin. Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:

`[](#%5F%5Fcodelineno-0-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-1-1) Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-facebook-sign-in` plugin in my project.
 ``

If you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:

`[](#%5F%5Fcodelineno-2-1)npm install @capawesome/capacitor-facebook-sign-in
[](#%5F%5Fcodelineno-2-2)npx cap sync
`

This plugin requires a Facebook app. If you don't have one yet, create it in the [Meta App Dashboard](https://developers.facebook.com/apps/) and add the **Facebook Login** product. You can find your **App ID** and **Client Token** in the app settings.

### Android[¶](#android "Permanent link")

#### Variables[¶](#variables "Permanent link")

This plugin will use the following project variables (defined in your app's `variables.gradle` file):

* `$facebookLoginVersion` version of `com.facebook.android:facebook-login` (default: `18.3.0`)

#### Resources[¶](#resources "Permanent link")

Add the following string resources to the `android/app/src/main/res/values/strings.xml` file:

`[](#%5F%5Fcodelineno-3-1)<string name="facebook_app_id">YOUR_APP_ID</string>
[](#%5F%5Fcodelineno-3-2)<string name="facebook_client_token">YOUR_CLIENT_TOKEN</string>
`

Replace `YOUR_APP_ID` with your Facebook App ID and `YOUR_CLIENT_TOKEN` with your Facebook Client Token.

#### Metadata[¶](#metadata "Permanent link")

Add the following elements inside the `application` tag of the `android/app/src/main/AndroidManifest.xml` file:

`[](#%5F%5Fcodelineno-4-1)<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
[](#%5F%5Fcodelineno-4-2)<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token" />
`

### iOS[¶](#ios "Permanent link")

Add the following keys to the `ios/App/App/Info.plist` file:

`[](#%5F%5Fcodelineno-5-1)<key>FacebookAppID</key>
[](#%5F%5Fcodelineno-5-2)<string>YOUR_APP_ID</string>
[](#%5F%5Fcodelineno-5-3)<key>FacebookClientToken</key>
[](#%5F%5Fcodelineno-5-4)<string>YOUR_CLIENT_TOKEN</string>
[](#%5F%5Fcodelineno-5-5)<key>FacebookDisplayName</key>
[](#%5F%5Fcodelineno-5-6)<string>YOUR_APP_NAME</string>
[](#%5F%5Fcodelineno-5-7)<key>LSApplicationQueriesSchemes</key>
[](#%5F%5Fcodelineno-5-8)<array>
[](#%5F%5Fcodelineno-5-9)  <string>fbapi</string>
[](#%5F%5Fcodelineno-5-10)  <string>fb-messenger-share-api</string>
[](#%5F%5Fcodelineno-5-11)</array>
`

Replace `YOUR_APP_ID` with your Facebook App ID, `YOUR_CLIENT_TOKEN` with your Facebook Client Token, and `YOUR_APP_NAME` with the display name of your Facebook app.

You also need to add the URL scheme for your Facebook App ID to the `ios/App/App/Info.plist` file:

`[](#%5F%5Fcodelineno-6-1)<key>CFBundleURLTypes</key>
[](#%5F%5Fcodelineno-6-2)<array>
[](#%5F%5Fcodelineno-6-3)  <dict>
[](#%5F%5Fcodelineno-6-4)    <key>CFBundleURLSchemes</key>
[](#%5F%5Fcodelineno-6-5)    <array>
[](#%5F%5Fcodelineno-6-6)      <string>fbYOUR_APP_ID</string>
[](#%5F%5Fcodelineno-6-7)    </array>
[](#%5F%5Fcodelineno-6-8)  </dict>
[](#%5F%5Fcodelineno-6-9)</array>
`

Replace `YOUR_APP_ID` with your Facebook App ID, so that the URL scheme is your App ID prefixed with `fb` (e.g. `fb1234567890123456`).

## Configuration[¶](#configuration "Permanent link")

No configuration required for this plugin.

## Usage[¶](#usage "Permanent link")

The following examples show how to initialize the plugin, sign in a user, sign in with Limited Login, get the current access token, and sign out a user.

### Initialize the plugin[¶](#initialize-the-plugin "Permanent link")

Call `initialize(...)` once before all other methods. On Android and iOS, the App ID is usually read from the native configuration, so the `appId` option is only required on Web:

`[](#%5F%5Fcodelineno-7-1)import { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';
[](#%5F%5Fcodelineno-7-2)
[](#%5F%5Fcodelineno-7-3)const initialize = async () => {
[](#%5F%5Fcodelineno-7-4)  await FacebookSignIn.initialize({
[](#%5F%5Fcodelineno-7-5)    appId: '1234567890123456',
[](#%5F%5Fcodelineno-7-6)  });
[](#%5F%5Fcodelineno-7-7)};
`

### Sign in a user[¶](#sign-in-a-user "Permanent link")

Start the Facebook Sign-In flow and retrieve the access token and the user's profile:

`[](#%5F%5Fcodelineno-8-1)import { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';
[](#%5F%5Fcodelineno-8-2)
[](#%5F%5Fcodelineno-8-3)const signIn = async () => {
[](#%5F%5Fcodelineno-8-4)  const result = await FacebookSignIn.signIn();
[](#%5F%5Fcodelineno-8-5)  console.log(result.accessToken?.token);
[](#%5F%5Fcodelineno-8-6)  console.log(result.profile.id);
[](#%5F%5Fcodelineno-8-7)  console.log(result.profile.name);
[](#%5F%5Fcodelineno-8-8)  console.log(result.profile.email);
[](#%5F%5Fcodelineno-8-9)};
`

### Sign in with Limited Login[¶](#sign-in-with-limited-login "Permanent link")

Use Limited Login to sign in users without tracking. Instead of an access token, an authentication token (JWT) is returned that can be verified on your backend. Provide a nonce to prevent replay attacks. Only available on iOS:

`[](#%5F%5Fcodelineno-9-1)import { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';
[](#%5F%5Fcodelineno-9-2)
[](#%5F%5Fcodelineno-9-3)const signInWithLimitedLogin = async () => {
[](#%5F%5Fcodelineno-9-4)  const result = await FacebookSignIn.signIn({
[](#%5F%5Fcodelineno-9-5)    limitedLogin: true,
[](#%5F%5Fcodelineno-9-6)    nonce: 'YOUR_NONCE',
[](#%5F%5Fcodelineno-9-7)  });
[](#%5F%5Fcodelineno-9-8)  console.log(result.authenticationToken);
[](#%5F%5Fcodelineno-9-9)};
`

### Get the current access token[¶](#get-the-current-access-token "Permanent link")

Retrieve the current access token, for example to check whether a user is still signed in. The result is `null` if no user is signed in or the access token has expired:

`[](#%5F%5Fcodelineno-10-1)import { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';
[](#%5F%5Fcodelineno-10-2)
[](#%5F%5Fcodelineno-10-3)const getCurrentAccessToken = async () => {
[](#%5F%5Fcodelineno-10-4)  const { accessToken } = await FacebookSignIn.getCurrentAccessToken();
[](#%5F%5Fcodelineno-10-5)  console.log(accessToken?.token);
[](#%5F%5Fcodelineno-10-6)};
`

### Sign out a user[¶](#sign-out-a-user "Permanent link")

Sign out the current user:

`[](#%5F%5Fcodelineno-11-1)import { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';
[](#%5F%5Fcodelineno-11-2)
[](#%5F%5Fcodelineno-11-3)const signOut = async () => {
[](#%5F%5Fcodelineno-11-4)  await FacebookSignIn.signOut();
[](#%5F%5Fcodelineno-11-5)};
`

## API[¶](#api "Permanent link")

* [getCurrentAccessToken()](#getcurrentaccesstoken)
* [initialize(...)](#initialize)
* [signIn(...)](#signin)
* [signOut()](#signout)
* [Interfaces](#interfaces)

### getCurrentAccessToken()[¶](#getcurrentaccesstoken "Permanent link")

`[](#%5F%5Fcodelineno-12-1)getCurrentAccessToken() => Promise<GetCurrentAccessTokenResult>
`

Get the current access token.

**Returns:** `Promise<[GetCurrentAccessTokenResult](#getcurrentaccesstokenresult)>`

**Since:** 0.1.0

---

### initialize(...)[¶](#initialize "Permanent link")

`[](#%5F%5Fcodelineno-13-1)initialize(options?: InitializeOptions | undefined) => Promise<void>
`

Initialize the Facebook Sign-In plugin.

This method must be called once before all other methods.

| Param       | Type                                    |
| ----------- | --------------------------------------- |
| **options** | [InitializeOptions](#initializeoptions) |

**Since:** 0.1.0

---

### signIn(...)[¶](#signin "Permanent link")

`[](#%5F%5Fcodelineno-14-1)signIn(options?: SignInOptions | undefined) => Promise<SignInResult>
`

Start the Facebook Sign-In flow.

| Param       | Type                            |
| ----------- | ------------------------------- |
| **options** | [SignInOptions](#signinoptions) |

**Returns:** `Promise<[SignInResult](#signinresult)>`

**Since:** 0.1.0

---

### signOut()[¶](#signout "Permanent link")

`[](#%5F%5Fcodelineno-15-1)signOut() => Promise<void>
`

Sign out the current user.

**Since:** 0.1.0

---

### Interfaces[¶](#interfaces "Permanent link")

#### GetCurrentAccessTokenResult[¶](#getcurrentaccesstokenresult "Permanent link")

| Prop            | Type                                | Description                                                                                     | Since |
| --------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------- | ----- |
| **accessToken** | [AccessToken](#accesstoken) \| null | The current access token. This is null if no user is signed in or the access token has expired. | 0.1.0 |

#### AccessToken[¶](#accesstoken "Permanent link")

| Prop            | Type       | Description                                                                         | Since |
| --------------- | ---------- | ----------------------------------------------------------------------------------- | ----- |
| **expiresAt**   | number     | The timestamp (in milliseconds since the Unix epoch) when the access token expires. | 0.1.0 |
| **permissions** | string\[\] | The permissions granted to the access token.                                        | 0.1.0 |
| **token**       | string     | The access token string.                                                            | 0.1.0 |
| **userId**      | string     | The unique identifier of the user's Facebook account.                               | 0.1.0 |

#### InitializeOptions[¶](#initializeoptions "Permanent link")

| Prop            | Type   | Description                                                                                                                                                                                           | Since |
| --------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **appId**       | string | The Facebook App ID from the Meta App Dashboard. On Android and iOS, this overrides the value from the native configuration and is usually not needed. **Attention**: This option is required on Web. | 0.1.0 |
| **clientToken** | string | The Facebook Client Token from the Meta App Dashboard. This overrides the value from the native configuration and is usually not needed. Only available on Android and iOS.                           | 0.1.0 |

#### SignInResult[¶](#signinresult "Permanent link")

| Prop                    | Type                                | Description                                                                                                                                      | Since |
| ----------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----- |
| **accessToken**         | [AccessToken](#accesstoken) \| null | The access token for accessing the Facebook Graph API. This is null on iOS when Limited Login is used.                                           | 0.1.0 |
| **authenticationToken** | string \| null                      | The authentication token (JWT) returned by Facebook. This token can be sent to your backend for verification. Only available on Android and iOS. | 0.1.0 |
| **profile**             | [Profile](#profile)                 | The profile of the signed-in user.                                                                                                               | 0.1.0 |

#### Profile[¶](#profile "Permanent link")

| Prop         | Type           | Description                                                                     | Since |
| ------------ | -------------- | ------------------------------------------------------------------------------- | ----- |
| **email**    | string \| null | The user's email address. This is null if the email permission was not granted. | 0.1.0 |
| **id**       | string         | The unique identifier of the user's Facebook account.                           | 0.1.0 |
| **imageUrl** | string \| null | The URL of the user's profile picture.                                          | 0.1.0 |
| **name**     | string \| null | The user's display name (full name).                                            | 0.1.0 |

#### SignInOptions[¶](#signinoptions "Permanent link")

| Prop             | Type       | Description                                                                                                                                                                                                                                                                                          | Default                        | Since |
| ---------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ----- |
| **limitedLogin** | boolean    | Whether or not to use [Limited Login](https://developers.facebook.com/docs/facebook-login/limited-login/) instead of classic login. With Limited Login, no access token is returned. Instead, an authentication token (JWT) is returned that can be verified on your backend. Only available on iOS. | false                          | 0.1.0 |
| **nonce**        | string     | A nonce to prevent replay attacks. The nonce is included in the authentication token and can be verified on your backend. Only available on iOS.                                                                                                                                                     |                                | 0.1.0 |
| **permissions**  | string\[\] | The permissions to request from the user.                                                                                                                                                                                                                                                            | \["public\_profile", "email"\] | 0.1.0 |

## Limited Login[¶](#limited-login "Permanent link")

On iOS, the Facebook SDK distinguishes between classic login and [Limited Login](https://developers.facebook.com/docs/facebook-login/limited-login/). With Limited Login, no data is shared with Meta that could be used for tracking, so no App Tracking Transparency consent is required. However, no access token for the Facebook Graph API is returned. Instead, an authentication token (JWT) is returned, which can be verified on your backend.

Keep the following in mind:

* Set the `limitedLogin` option to `true` to use Limited Login.
* If the user has not granted the App Tracking Transparency permission, the Facebook SDK may fall back to Limited Login even if classic login was requested. In this case, the `accessToken` property in the sign-in result is `null`.
* Provide a `nonce` option and verify it on your backend to prevent replay attacks.

## Security[¶](#security "Permanent link")

This plugin handles the sign-in flow and returns tokens to your app. To keep your integration secure, be aware of the following:

* **Server-side token verification is required.** The `authenticationToken` (JWT) is **not** verified client-side. Your backend **must** verify the JWT signature using [Facebook's public keys](https://www.facebook.com/.well-known/oauth/openid/jwks/) before trusting any claims. Never use client-side token data for authorization decisions without server-side verification.
* **Validate the access token on your backend.** If you use the `accessToken`, your backend should validate it with the [Facebook Graph API](https://developers.facebook.com/docs/facebook-login/guides/advanced/manual-flow#checktoken) before trusting it.

## FAQ[¶](#faq "Permanent link")

### How is this plugin different from other similar plugins?[¶](#how-is-this-plugin-different-from-other-similar-plugins "Permanent link")

It covers the full Facebook sign-in flow across Android, iOS, and the Web, returning both the access token for the Graph API and the signed-in user's profile through a fully typed API. On iOS it supports Limited Login with nonce verification, so you can sign users in without tracking and without App Tracking Transparency consent, and it works alongside the Apple and Google Sign-In plugins when you want to offer several options. Detailed error codes and support for the latest Capacitor version round it out. If you only ever need a single provider, a lighter setup can be enough; when you need Facebook handled thoroughly, this plugin is built for exactly that.

### Do I need a Facebook app to use this plugin?[¶](#do-i-need-a-facebook-app-to-use-this-plugin "Permanent link")

Yes, this plugin requires a Facebook app. You can create one in the [Meta App Dashboard](https://developers.facebook.com/apps/) and add the **Facebook Login** product to it. The **App ID** and **Client Token** from the app settings are needed for the platform-specific configuration, see the [Installation](#installation) section.

### What is Limited Login and when should I use it?[¶](#what-is-limited-login-and-when-should-i-use-it "Permanent link")

Limited Login is an alternative sign-in mode of the Facebook SDK on iOS. With Limited Login, no data is shared with Meta that could be used for tracking, so no App Tracking Transparency consent is required. However, no access token for the Facebook Graph API is returned. Instead, an authentication token (JWT) is returned, which can be verified on your backend. Set the `limitedLogin` option to `true` to use it.

### Why is the `accessToken` property `null` after signing in on iOS?[¶](#why-is-the-accesstoken-property-null-after-signing-in-on-ios "Permanent link")

This happens when Limited Login is used. If the user has not granted the App Tracking Transparency permission, the Facebook SDK may fall back to Limited Login even if classic login was requested. In this case, use the `authenticationToken` (JWT) instead and verify it on your backend.

### How do I verify the sign-in on my backend?[¶](#how-do-i-verify-the-sign-in-on-my-backend "Permanent link")

Your backend must verify the JWT signature of the `authenticationToken` using [Facebook's public keys](https://www.facebook.com/.well-known/oauth/openid/jwks/) before trusting any claims. If you use the `accessToken`, your backend should validate it with the Facebook Graph API before trusting it. See the [Security](#security) section for more details.

### Can I use this plugin together with other sign-in plugins?[¶](#can-i-use-this-plugin-together-with-other-sign-in-plugins "Permanent link")

Yes, the plugin works alongside the [Apple Sign-In](https://capawesome.io/docs/sdks/capacitor/apple-sign-in/) and [Google Sign-In](https://capawesome.io/docs/sdks/capacitor/google-sign-in/) plugins, so you can offer multiple sign-in options in the same app.

### Can I use this plugin with Ionic, React, Vue or Angular?[¶](#can-i-use-this-plugin-with-ionic-react-vue-or-angular "Permanent link")

Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.

## Related Plugins[¶](#related-plugins "Permanent link")

* [Apple Sign-In](https://capawesome.io/docs/sdks/capacitor/apple-sign-in/): Sign in users with their Apple account.
* [Biometrics](https://capawesome.io/docs/sdks/capacitor/biometrics/): Request biometric authentication such as face or fingerprint recognition.
* [Google Sign-In](https://capawesome.io/docs/sdks/capacitor/google-sign-in/): Sign in users with their Google account.
* [OAuth](https://capawesome.io/docs/sdks/capacitor/oauth/): Communicate with any OAuth 2.0 and OpenID Connect provider.

## Newsletter[¶](#newsletter "Permanent link")

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).

## Changelog[¶](#changelog "Permanent link")

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/facebook-sign-in/CHANGELOG.md).

## License[¶](#license "Permanent link")

See [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/facebook-sign-in/LICENSE).

---

1. This project is not affiliated with, endorsed by, sponsored by, or approved by Meta Platforms, Inc. or any of its affiliates or subsidiaries. [↩](#fnref:1 "Jump back to footnote 1 in the text")

July 8, 2026 

Back to top

```json
{"@context": "https://schema.org", "@graph": [{"@type": "TechArticle", "@id": "https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/#article", "headline": "Capacitor Facebook Sign-In Plugin", "name": "Capacitor Facebook Sign-In Plugin", "description": "Capacitor plugin to sign in users with their Facebook account on Android, iOS, and the Web, including Limited Login and access token retrieval.", "inLanguage": "en", "url": "https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/", "mainEntityOfPage": "https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/", "author": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "publisher": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "about": {"@id": "https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/#software"}}, {"@type": "SoftwareSourceCode", "@id": "https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/#software", "name": "Capacitor Facebook Sign-In Plugin", "description": "Capacitor plugin to sign in users with their Facebook account on Android, iOS, and the Web, including Limited Login and access token retrieval.", "url": "https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/", "programmingLanguage": "TypeScript", "runtimePlatform": "Capacitor", "codeRepository": "https://github.com/capawesome-team", "author": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "publisher": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}}]}
{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "How is this plugin different from other similar plugins?", "acceptedAnswer": {"@type": "Answer", "text": "It covers the full Facebook sign-in flow across Android, iOS, and the Web, returning both the access token for the Graph API and the signed-in user's profile through a fully typed API. On iOS it supports Limited Login with nonce verification, so you can sign users in without tracking and without App Tracking Transparency consent, and it works alongside the Apple and Google Sign-In plugins when you want to offer several options. Detailed error codes and support for the latest Capacitor version round it out. If you only ever need a single provider, a lighter setup can be enough; when you need Facebook handled thoroughly, this plugin is built for exactly that."}}, {"@type": "Question", "name": "Do I need a Facebook app to use this plugin?", "acceptedAnswer": {"@type": "Answer", "text": "Yes, this plugin requires a Facebook app. You can create one in the Meta App Dashboard and add the Facebook Login product to it. The App ID and Client Token from the app settings are needed for the platform-specific configuration, see the Installation section."}}, {"@type": "Question", "name": "What is Limited Login and when should I use it?", "acceptedAnswer": {"@type": "Answer", "text": "Limited Login is an alternative sign-in mode of the Facebook SDK on iOS. With Limited Login, no data is shared with Meta that could be used for tracking, so no App Tracking Transparency consent is required. However, no access token for the Facebook Graph API is returned. Instead, an authentication token (JWT) is returned, which can be verified on your backend. Set the limitedLogin option to true to use it."}}, {"@type": "Question", "name": "Why is the accessToken property null after signing in on iOS?", "acceptedAnswer": {"@type": "Answer", "text": "This happens when Limited Login is used. If the user has not granted the App Tracking Transparency permission, the Facebook SDK may fall back to Limited Login even if classic login was requested. In this case, use the authenticationToken (JWT) instead and verify it on your backend."}}, {"@type": "Question", "name": "How do I verify the sign-in on my backend?", "acceptedAnswer": {"@type": "Answer", "text": "Your backend must verify the JWT signature of the authenticationToken using Facebook's public keys before trusting any claims. If you use the accessToken, your backend should validate it with the Facebook Graph API before trusting it. See the Security section for more details."}}, {"@type": "Question", "name": "Can I use this plugin together with other sign-in plugins?", "acceptedAnswer": {"@type": "Answer", "text": "Yes, the plugin works alongside the Apple Sign-In and Google Sign-In plugins, so you can offer multiple sign-in options in the same app."}}, {"@type": "Question", "name": "Can I use this plugin with Ionic, React, Vue or Angular?", "acceptedAnswer": {"@type": "Answer", "text": "Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects."}}], "url": "https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/"}
```
