{"_id":"@capawesome/capacitor-facebook-sign-in","_rev":"3-df3b14da80217bdfb82a0a224737ad6f","name":"@capawesome/capacitor-facebook-sign-in","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"@capawesome/capacitor-facebook-sign-in","version":"0.0.1","keywords":["capacitor","plugin","native"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-facebook-sign-in@0.0.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/plugins/facebook-sign-in/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"40c0845de93852b564654365807dab60a157aff7","tarball":"https://registry.npmjs.org/@capawesome/capacitor-facebook-sign-in/-/capacitor-facebook-sign-in-0.0.1.tgz","fileCount":45,"integrity":"sha512-jsfgd6OPUko8EtzDqBhkFYKno2fUiEdYX4H5oK4xQnpd4C5daY0Z1J5R5coe4igVIox5E2tF+5JPA0XHiAen6w==","signatures":[{"sig":"MEYCIQDPv5oHchEu5jlNB3XhEhX5sEk/WxooRfS3VZgjVHPFhAIhALxAX/w5fMcAglEOKGMfOIN8uMliYpi07M7LWuiItbx0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":131998},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"8dd31ce5d3f16f94fb71d033f47512e99908f4e4","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api FacebookSignInPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"robingenz","email":"mail@robingenz.dev"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.13.0","description":"Capacitor plugin to sign-in with Facebook.","directories":{},"_nodeVersion":"24.16.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-facebook-sign-in_0.0.1_1783405248845_0.22625275932677624","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@capawesome/capacitor-facebook-sign-in","version":"0.1.0","keywords":["capacitor","plugin","native","capacitor-plugin","facebook","facebook login","facebook sign-in","social login","authentication","limited login","access token"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-facebook-sign-in@0.1.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"4418795e22b4895187d455f22491970b1cb7aa01","tarball":"https://registry.npmjs.org/@capawesome/capacitor-facebook-sign-in/-/capacitor-facebook-sign-in-0.1.0.tgz","fileCount":45,"integrity":"sha512-6mC4EUELc50kJZAwyrUhiIYfhqvb7wQcptwVQr/B6wgTV9M1FcpMqNWnO25I0Nd2g3PssSg61S7eHkTihNHXTg==","signatures":[{"sig":"MEYCIQD5+HlaFNiiTWtXt2+wU+Zlbfzzd8sRSXax5UkZ5rS7PwIhAOm0C1AN/BB0CuL4a3+GMYFbU+TRSdP16tL63biFJNQv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-facebook-sign-in@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":137784},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"1ce17b1fd14c43b2f1d5d3c2da82221e1d1dca37","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api FacebookSignInPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:03f4d546-5324-4c64-ae33-bd7c30fd13d0"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin to sign-in with Facebook on Android, iOS, and Web.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-facebook-sign-in_0.1.0_1784015518423_0.8613455535965799","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@capawesome/capacitor-facebook-sign-in","version":"0.1.1","description":"Capacitor plugin to sign-in with Facebook on Android, iOS, and Web.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","homepage":"https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/","repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"funding":[{"type":"github","url":"https://github.com/sponsors/capawesome-team/"},{"type":"opencollective","url":"https://opencollective.com/capawesome"}],"keywords":["capacitor","plugin","native","capacitor-plugin","facebook","facebook login","facebook sign-in","social login","authentication","limited login","access token"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:android":"cd android && ./gradlew clean build test && cd ..","verify:web":"npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","docgen":"docgen --api FacebookSignInPlugin --output-readme README.md --output-json dist/docs.json","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd ..","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/android":"8.0.0","@capacitor/cli":"8.4.2","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/ios":"8.0.0","@ionic/eslint-config":"0.4.0","eslint":"8.57.0","prettier-plugin-java":"2.9.7","rimraf":"6.1.2","rollup":"4.62.3","swiftlint":"2.0.0","typescript":"5.9.3"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"publishConfig":{"access":"public"},"gitHead":"7c1937ed10b7de86ca2c1cdc3539a2735fd69a00","_id":"@capawesome/capacitor-facebook-sign-in@0.1.1","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-KyghBMZonEOA0o70f1k7+Mp0poWjugWKkUGndT4n1IhxgrGegZbT4IRNU7hK7uaOA1ahkjFtwkUZbUVybo5nhw==","shasum":"0bb6d2cb2ca22e10de08372ed9787f8333f077f3","tarball":"https://registry.npmjs.org/@capawesome/capacitor-facebook-sign-in/-/capacitor-facebook-sign-in-0.1.1.tgz","fileCount":45,"unpackedSize":137626,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-facebook-sign-in@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDlOjMAYL6GK1TXxn9CMUoJucRysUKbPoDITM1SqrKHcwIhAPrsOHQ+uHKr6baFDHZm+rAqTQL2EmmvCxIT6Yi0aaE+"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:03f4d546-5324-4c64-ae33-bd7c30fd13d0"}},"directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-facebook-sign-in_0.1.1_1788337332961_0.6932099406924943"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-07T06:20:48.658Z","modified":"2026-09-02T08:22:13.456Z","0.0.1":"2026-07-07T06:20:48.978Z","0.1.0":"2026-07-14T07:51:58.553Z","0.1.1":"2026-09-02T08:22:13.107Z"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","homepage":"https://capawesome.io/docs/sdks/capacitor/facebook-sign-in/","keywords":["capacitor","plugin","native","capacitor-plugin","facebook","facebook login","facebook sign-in","social login","authentication","limited login","access token"],"repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"description":"Capacitor plugin to sign-in with Facebook on Android, iOS, and Web.","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"readme":"# Capacitor Facebook Sign-In Plugin\n\nUnofficial Capacitor plugin to sign-in with Facebook.[^1]\n\n<div class=\"capawesome-z29o10a\">\n  <a href=\"https://cloud.capawesome.io/\" target=\"_blank\">\n    <img alt=\"Deliver Live Updates to your Capacitor app with Capawesome Cloud\" src=\"https://cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1\" />\n  </a>\n</div>\n\n## Features\n\nThe Capacitor Facebook Sign-In plugin is a comprehensive Facebook authentication solution for Capacitor apps. Here are some of the key features:\n\n- 🖥️ **Cross-platform**: Supports Android, iOS, and Web.\n- 🔐 **Authentication**: Sign in users with their Facebook account.\n- 🔑 **Access Token**: Retrieve the access token for the Facebook Graph API.\n- 👤 **User Profile**: Retrieve the user's email, display name, profile picture, and more.\n- 🕵️ **Limited Login**: Support for Limited Login on iOS to sign in users without tracking.\n- 🛡️ **Nonce Support**: Prevent replay attacks with a custom nonce on iOS.\n- 🪶 **Lightweight**: Just a single dependency and zero unnecessary bloat.\n- 🚨 **Error Codes**: Provides detailed error codes for better error handling.\n- 🤝 **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.\n- 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.\n- 🔁 **Up-to-date**: Always supports the latest Capacitor version.\n\nMissing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!\n\n## Use Cases\n\nThe Facebook Sign-In plugin is typically used wherever users should sign in with their existing Facebook account, for example:\n\n- **Social login**: Let users sign in to your app with their Facebook account instead of creating a new password.\n- **Backend authentication**: Send the authentication token (JWT) to your backend to verify the user's identity.\n- **Graph API access**: Use the access token to request data from the Facebook Graph API on behalf of the user.\n- **Privacy-friendly sign-in on iOS**: Use Limited Login to sign in users without tracking and without App Tracking Transparency consent.\n- **Profile pre-filling**: Use the user's email, display name, and profile picture to pre-fill their profile in your app.\n\n## Compatibility\n\n| Plugin Version | Capacitor Version | Status         |\n| -------------- | ----------------- | -------------- |\n| 0.1.x          | >=8.x.x           | Active support |\n\n## Installation\n\nYou can use our **AI-Assisted Setup** to install the plugin.\nAdd the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:\n\n```bash\nnpx skills add capawesome-team/skills --skill capacitor-plugins\n```\n\nThen use the following prompt:\n\n```\n Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-facebook-sign-in` plugin in my project.\n```\n\nIf you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:\n\n```bash\nnpm install @capawesome/capacitor-facebook-sign-in\nnpx cap sync\n```\n\nThis 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.\n\n### Android\n\n#### Variables\n\nThis plugin will use the following project variables (defined in your app's `variables.gradle` file):\n\n- `$facebookLoginVersion` version of `com.facebook.android:facebook-login` (default: `18.3.0`)\n\n#### Resources\n\nAdd the following string resources to the `android/app/src/main/res/values/strings.xml` file:\n\n```xml\n<string name=\"facebook_app_id\">YOUR_APP_ID</string>\n<string name=\"facebook_client_token\">YOUR_CLIENT_TOKEN</string>\n```\n\nReplace `YOUR_APP_ID` with your Facebook App ID and `YOUR_CLIENT_TOKEN` with your Facebook Client Token.\n\n#### Metadata\n\nAdd the following elements inside the `application` tag of the `android/app/src/main/AndroidManifest.xml` file:\n\n```xml\n<meta-data android:name=\"com.facebook.sdk.ApplicationId\" android:value=\"@string/facebook_app_id\" />\n<meta-data android:name=\"com.facebook.sdk.ClientToken\" android:value=\"@string/facebook_client_token\" />\n```\n\n### iOS\n\nAdd the following keys to the `ios/App/App/Info.plist` file:\n\n```xml\n<key>FacebookAppID</key>\n<string>YOUR_APP_ID</string>\n<key>FacebookClientToken</key>\n<string>YOUR_CLIENT_TOKEN</string>\n<key>FacebookDisplayName</key>\n<string>YOUR_APP_NAME</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n  <string>fbapi</string>\n  <string>fb-messenger-share-api</string>\n</array>\n```\n\nReplace `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.\n\nYou also need to add the URL scheme for your Facebook App ID to the `ios/App/App/Info.plist` file:\n\n```xml\n<key>CFBundleURLTypes</key>\n<array>\n  <dict>\n    <key>CFBundleURLSchemes</key>\n    <array>\n      <string>fbYOUR_APP_ID</string>\n    </array>\n  </dict>\n</array>\n```\n\nReplace `YOUR_APP_ID` with your Facebook App ID, so that the URL scheme is your App ID prefixed with `fb` (e.g. `fb1234567890123456`).\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Usage\n\nThe 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.\n\n### Initialize the plugin\n\nCall `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:\n\n```typescript\nimport { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';\n\nconst initialize = async () => {\n  await FacebookSignIn.initialize({\n    appId: '1234567890123456',\n  });\n};\n```\n\n### Sign in a user\n\nStart the Facebook Sign-In flow and retrieve the access token and the user's profile:\n\n```typescript\nimport { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';\n\nconst signIn = async () => {\n  const result = await FacebookSignIn.signIn();\n  console.log(result.accessToken?.token);\n  console.log(result.profile.id);\n  console.log(result.profile.name);\n  console.log(result.profile.email);\n};\n```\n\n### Sign in with Limited Login\n\nUse 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:\n\n```typescript\nimport { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';\n\nconst signInWithLimitedLogin = async () => {\n  const result = await FacebookSignIn.signIn({\n    limitedLogin: true,\n    nonce: 'YOUR_NONCE',\n  });\n  console.log(result.authenticationToken);\n};\n```\n\n### Get the current access token\n\nRetrieve 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:\n\n```typescript\nimport { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';\n\nconst getCurrentAccessToken = async () => {\n  const { accessToken } = await FacebookSignIn.getCurrentAccessToken();\n  console.log(accessToken?.token);\n};\n```\n\n### Sign out a user\n\nSign out the current user:\n\n```typescript\nimport { FacebookSignIn } from '@capawesome/capacitor-facebook-sign-in';\n\nconst signOut = async () => {\n  await FacebookSignIn.signOut();\n};\n```\n\n## API\n\n<docgen-index>\n\n* [`getCurrentAccessToken()`](#getcurrentaccesstoken)\n* [`initialize(...)`](#initialize)\n* [`signIn(...)`](#signin)\n* [`signOut()`](#signout)\n* [Interfaces](#interfaces)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### getCurrentAccessToken()\n\n```typescript\ngetCurrentAccessToken() => Promise<GetCurrentAccessTokenResult>\n```\n\nGet the current access token.\n\n**Returns:** <code>Promise&lt;<a href=\"#getcurrentaccesstokenresult\">GetCurrentAccessTokenResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### initialize(...)\n\n```typescript\ninitialize(options?: InitializeOptions | undefined) => Promise<void>\n```\n\nInitialize the Facebook Sign-In plugin.\n\nThis method must be called once before all other methods.\n\n| Param         | Type                                                            |\n| ------------- | --------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#initializeoptions\">InitializeOptions</a></code> |\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### signIn(...)\n\n```typescript\nsignIn(options?: SignInOptions | undefined) => Promise<SignInResult>\n```\n\nStart the Facebook Sign-In flow.\n\n| Param         | Type                                                    |\n| ------------- | ------------------------------------------------------- |\n| **`options`** | <code><a href=\"#signinoptions\">SignInOptions</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#signinresult\">SignInResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### signOut()\n\n```typescript\nsignOut() => Promise<void>\n```\n\nSign out the current user.\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### GetCurrentAccessTokenResult\n\n| Prop              | Type                                                        | Description                                                                                       | Since |\n| ----------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----- |\n| **`accessToken`** | <code><a href=\"#accesstoken\">AccessToken</a> \\| null</code> | The current access token. This is `null` if no user is signed in or the access token has expired. | 0.1.0 |\n\n\n#### AccessToken\n\n| Prop              | Type                  | Description                                                                         | Since |\n| ----------------- | --------------------- | ----------------------------------------------------------------------------------- | ----- |\n| **`expiresAt`**   | <code>number</code>   | The timestamp (in milliseconds since the Unix epoch) when the access token expires. | 0.1.0 |\n| **`permissions`** | <code>string[]</code> | The permissions granted to the access token.                                        | 0.1.0 |\n| **`token`**       | <code>string</code>   | The access token string.                                                            | 0.1.0 |\n| **`userId`**      | <code>string</code>   | The unique identifier of the user's Facebook account.                               | 0.1.0 |\n\n\n#### InitializeOptions\n\n| Prop              | Type                | Description                                                                                                                                                                                           | Since |\n| ----------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |\n| **`appId`**       | <code>string</code> | 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 |\n| **`clientToken`** | <code>string</code> | 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 |\n\n\n#### SignInResult\n\n| Prop                      | Type                                                        | Description                                                                                                                                      | Since |\n| ------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----- |\n| **`accessToken`**         | <code><a href=\"#accesstoken\">AccessToken</a> \\| null</code> | The access token for accessing the Facebook Graph API. This is `null` on iOS when Limited Login is used.                                         | 0.1.0 |\n| **`authenticationToken`** | <code>string \\| null</code>                                 | 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 |\n| **`profile`**             | <code><a href=\"#profile\">Profile</a></code>                 | The profile of the signed-in user.                                                                                                               | 0.1.0 |\n\n\n#### Profile\n\n| Prop           | Type                        | Description                                                                         | Since |\n| -------------- | --------------------------- | ----------------------------------------------------------------------------------- | ----- |\n| **`email`**    | <code>string \\| null</code> | The user's email address. This is `null` if the `email` permission was not granted. | 0.1.0 |\n| **`id`**       | <code>string</code>         | The unique identifier of the user's Facebook account.                               | 0.1.0 |\n| **`imageUrl`** | <code>string \\| null</code> | The URL of the user's profile picture.                                              | 0.1.0 |\n| **`name`**     | <code>string \\| null</code> | The user's display name (full name).                                                | 0.1.0 |\n\n\n#### SignInOptions\n\n| Prop               | Type                  | Description                                                                                                                                                                                                                                                                                          | Default                                  | Since |\n| ------------------ | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ----- |\n| **`limitedLogin`** | <code>boolean</code>  | 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. | <code>false</code>                       | 0.1.0 |\n| **`nonce`**        | <code>string</code>   | 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 |\n| **`permissions`**  | <code>string[]</code> | The permissions to request from the user.                                                                                                                                                                                                                                                            | <code>[\"public_profile\", \"email\"]</code> | 0.1.0 |\n\n</docgen-api>\n\n## Limited Login\n\nOn 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.\n\nKeep the following in mind:\n\n- Set the `limitedLogin` option to `true` to use Limited Login.\n- 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`.\n- Provide a `nonce` option and verify it on your backend to prevent replay attacks.\n\n## Security\n\nThis plugin handles the sign-in flow and returns tokens to your app. To keep your integration secure, be aware of the following:\n\n- **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.\n- **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.\n\n## FAQ\n\n### How is this plugin different from other similar plugins?\n\nIt 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.\n\n### Do I need a Facebook app to use this plugin?\n\nYes, 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.\n\n### What is Limited Login and when should I use it?\n\nLimited 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.\n\n### Why is the `accessToken` property `null` after signing in on iOS?\n\nThis 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.\n\n### How do I verify the sign-in on my backend?\n\nYour 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.\n\n### Can I use this plugin together with other sign-in plugins?\n\nYes, 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.\n\n### Can I use this plugin with Ionic, React, Vue or Angular?\n\nYes, 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.\n\n## Related Plugins\n\n- [Apple Sign-In](https://capawesome.io/docs/sdks/capacitor/apple-sign-in/): Sign in users with their Apple account.\n- [Biometrics](https://capawesome.io/docs/sdks/capacitor/biometrics/): Request biometric authentication such as face or fingerprint recognition.\n- [Google Sign-In](https://capawesome.io/docs/sdks/capacitor/google-sign-in/): Sign in users with their Google account.\n- [OAuth](https://capawesome.io/docs/sdks/capacitor/oauth/): Communicate with any OAuth 2.0 and OpenID Connect provider.\n\n## Newsletter\n\nStay 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/).\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/facebook-sign-in/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/facebook-sign-in/LICENSE).\n\n[^1]: This project is not affiliated with, endorsed by, sponsored by, or approved by Meta Platforms, Inc. or any of its affiliates or subsidiaries.\n","readmeFilename":"README.md"}