{"id":20980866,"url":"https://github.com/cap-go/capacitor-social-login","last_synced_at":"2026-04-24T09:02:28.704Z","repository":{"id":256677326,"uuid":"851610840","full_name":"Cap-go/capacitor-social-login","owner":"Cap-go","description":"One plugin to make login with Google,Apple,Facebook and so on, simple and fast to implement","archived":false,"fork":false,"pushed_at":"2025-03-31T16:58:53.000Z","size":31825,"stargazers_count":79,"open_issues_count":19,"forks_count":23,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T07:16:27.621Z","etag":null,"topics":["capacitor","capacitor-plugin","plugin"],"latest_commit_sha":null,"homepage":"https://capgo.app","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cap-go.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Cap-go","patreon":null,"open_collective":"capgo","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2024-09-03T12:13:18.000Z","updated_at":"2025-03-31T12:46:02.000Z","dependencies_parsed_at":"2024-09-12T11:48:14.537Z","dependency_job_id":"af030787-df90-4387-9a46-5dcca5547b0a","html_url":"https://github.com/Cap-go/capacitor-social-login","commit_stats":{"total_commits":242,"total_committers":8,"mean_commits":30.25,"dds":0.5413223140495868,"last_synced_commit":"73ca73fe54090421de985ee7d2265f304daa64d4"},"previous_names":["cap-go/capacitor-social-login"],"tags_count":149,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-social-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-social-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-social-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-social-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap-go","download_url":"https://codeload.github.com/Cap-go/capacitor-social-login/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248607068,"owners_count":21132467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capacitor","capacitor-plugin","plugin"],"created_at":"2024-11-19T05:31:01.614Z","updated_at":"2026-02-16T13:13:18.355Z","avatar_url":"https://github.com/Cap-go.png","language":"Java","funding_links":["https://github.com/sponsors/Cap-go","https://opencollective.com/capgo"],"categories":[],"sub_categories":[],"readme":"# @capgo/capacitor-social-login\n \u003ca href=\"https://capgo.app/\"\u003e\u003cimg src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/?ref=plugin_social_login\"\u003e ➡️ Get Instant updates for your App with Capgo\u003c/a\u003e\u003c/h2\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/consulting/?ref=plugin_social_login\"\u003e Missing a feature? We’ll build the plugin for you 💪\u003c/a\u003e\u003c/h2\u003e\n\u003c/div\u003e\n\n## Fork Information\nThis plugin is a fork of [@codetrix-studio/capacitor-google-auth](https://github.com/CodetrixStudio/CapacitorGoogleAuth). We created this fork because the original plugin is \"virtually\" archived with no way to reach the maintainer in any medium, and only one person (@reslear) has write rights but doesn't handle native code.\n\nIf you're currently using `@codetrix-studio/capacitor-google-auth`, we recommend migrating to this plugin. You can follow our [migration guide here](https://github.com/Cap-go/capacitor-social-login/blob/main/MIGRATION_CODETRIX.md).\n\n## About\nAll social logins in one plugin\n\nThis plugin implements social auth for:\n- Google (with credential manager)\n- Apple (with OAuth on android)\n- Facebook (with latest SDK)\n- Twitter/X (OAuth 2.0)\n- Generic OAuth2 (supports multiple providers: GitHub, Azure AD, Auth0, Okta, and any OAuth2-compliant server)\n\nThis plugin is the all-in-one solution for social authentication on Web, iOS, and Android.\nIt is our official alternative to the Appflow Social Login plugin.\n\n## Ionic Auth Connect compatibility\n\nThis plugin is designed to be compatible with Ionic Auth Connect provider names using the built-in OAuth2 engine.\nUse the Auth Connect preset wrapper (`SocialLoginAuthConnect`) to log in with `auth0`, `azure`, `cognito`, `okta`, and `onelogin`.\n\n- Compatibility guide: https://github.com/Cap-go/capacitor-social-login/blob/main/docs/auth_connect_compatibility.md\n- Migration guide: https://github.com/Cap-go/capacitor-social-login/blob/main/MIGRATION_AUTH_CONNECT.md\n\n## Documentation\n\nBest experience to read the doc here:\n\nhttps://capgo.app/docs/plugins/social-login/getting-started/\n\n## Compatibility\n\n| Plugin version | Capacitor compatibility | Maintained |\n| -------------- | ----------------------- | ---------- |\n| v8.\\*.\\*       | v8.\\*.\\*                | ✅          |\n| v7.\\*.\\*       | v7.\\*.\\*                | On demand   |\n| v6.\\*.\\*       | v6.\\*.\\*                | ❌          |\n| v5.\\*.\\*       | v5.\\*.\\*                | ❌          |\n\n\u003e **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.\n\n## Install\n\n```bash\nnpm install @capgo/capacitor-social-login\nnpx cap sync\n```\n\n## Dynamic Provider Dependencies\n\nYou can configure which providers to include to reduce app size. This is especially useful if you only need specific providers.\n\n### Configuration\n\nAdd provider configuration to your `capacitor.config.ts`:\n\n```typescript\nimport type { CapacitorConfig } from '@capacitor/cli';\n\nconst config: CapacitorConfig = {\n  appId: 'com.example.app',\n  appName: 'MyApp',\n  webDir: 'dist',\n  plugins: {\n    SocialLogin: {\n      providers: {\n        google: true,      // true = enabled (bundled), false = disabled (not bundled)\n        facebook: true,   // Use false to reduce app size\n        apple: true,      // Apple uses system APIs, no external deps\n        twitter: false   // false = disabled (not bundled)\n      },\n      logLevel: 1 // Warnings and errors only\n    }\n  }\n};\n\nexport default config;\n```\n\n### Provider Configuration\n\n- **`true`** (default): Provider is enabled - dependencies are bundled in final APK/IPA\n- **`false`**: Provider is disabled - dependencies are not bundled in final APK/IPA\n\n### Notes\n\n- Changes require running `npx cap sync` to take effect\n- If configuration is not provided, all providers default to `true` (enabled, backward compatible)\n- **Important**: Disabling a provider (`false`) will make it unavailable at runtime, regardless of whether it actually adds any dependencies. The provider will be disabled even if it uses only system APIs.\n- This configuration only affects iOS and Android platforms; it does not affect the web platform.\n- **Important**: Using `false` means the dependency won't be bundled, but the plugin code still compiles against it. Ensure the consuming app includes the dependency if needed.\n- Apple Sign-In on Android uses OAuth flow without external SDK dependencies\n- Twitter uses standard OAuth 2.0 flow without external SDK dependencies\n\n### Example: Reduce App Size\n\nTo only include Google Sign-In and disable others:\n\n```typescript\nplugins: {\n  SocialLogin: {\n    providers: {\n      google: true,      // Enabled\n      facebook: false,   // Disabled (not bundled)\n      apple: true,       // Enabled\n      twitter: false     // Disabled (not bundled)\n    }\n  }\n}\n```\n\n## Apple\n\n[How to get the credentials](https://github.com/Cap-go/capacitor-social-login/blob/main/docs/setup_apple.md)\n[How to setup redirect url](https://github.com/Cap-go/capacitor-social-login/blob/main/docs/apple_redirect_url.png)\n\n### Android configuration\n\nFor android you need a server to get the callback from the apple login. As we use the web SDK .\n\nCall the `initialize` method with the `apple` provider\n\n```typescript\nawait SocialLogin.initialize({\n  apple: {\n    clientId: 'your-client-id',\n    redirectUrl: 'your-redirect-url',\n  },\n});\nconst res = await SocialLogin.login({\n  provider: 'apple',\n  options: {\n    scopes: ['email', 'name'],\n  },\n});\n```\n\n### iOS configuration\n\ncall the `initialize` method with the `apple` provider\n\n```typescript\nawait SocialLogin.initialize({\n  apple: {\n    clientId: 'your-client-id', // it not used at os level only in plugin to know which provider initialize\n  },\n});\nconst res = await SocialLogin.login({\n  provider: 'apple',\n  options: {\n    scopes: ['email', 'name'],\n  },\n});\n```\n\n## Facebook\n\nDocs: [How to setup facebook login](https://capgo.app/docs/plugins/social-login/facebook/)\n\n📘 **[Complete Facebook Business Login Guide](./docs/facebook_business_login.md)** - Learn how to access Instagram, Pages, and business features\n\n### Facebook Business Login\n\nThis plugin fully supports Facebook Business Login for accessing business-related features and permissions. Business accounts can request additional permissions beyond standard consumer login, including Instagram and Pages management.\n\n**Supported Business Permissions:**\n- `instagram_basic` - Access to Instagram Basic Display API\n- `instagram_manage_insights` - Access to Instagram Insights\n- `pages_show_list` - List of Pages the person manages\n- `pages_read_engagement` - Read engagement data from Pages\n- `pages_manage_posts` - Manage posts on Pages\n- `business_management` - Manage business assets\n- And many more - see [Facebook Permissions Reference](https://developers.facebook.com/docs/permissions/reference)\n\n**Configuration Requirements:**\n1. Your Facebook app must be configured as a Business app in the Facebook Developer Console\n2. Business permissions may require Facebook's App Review before production use\n3. Your app must comply with Facebook's Business Use Case policies\n\n**Example - Instagram Basic Access:**\n```typescript\nawait SocialLogin.initialize({\n  facebook: {\n    appId: 'your-business-app-id',\n    clientToken: 'your-client-token',\n  },\n});\n\nconst res = await SocialLogin.login({\n  provider: 'facebook',\n  options: {\n    permissions: [\n      'email', \n      'public_profile',\n      'instagram_basic',           // Instagram account info\n      'pages_show_list',           // List of managed Pages\n      'pages_read_engagement'      // Page engagement data\n    ],\n  },\n});\n\n// Access Instagram data through Facebook Graph API\nconst profile = await SocialLogin.providerSpecificCall({\n  call: 'facebook#getProfile',\n  options: {\n    fields: ['id', 'name', 'email', 'instagram_business_account'],\n  },\n});\n```\n\n**Example - Pages Management:**\n```typescript\nconst res = await SocialLogin.login({\n  provider: 'facebook',\n  options: {\n    permissions: [\n      'email',\n      'pages_show_list',\n      'pages_manage_posts',\n      'pages_read_engagement',\n    ],\n  },\n});\n\n// Fetch user's managed pages with Instagram accounts\nconst profile = await SocialLogin.providerSpecificCall({\n  call: 'facebook#getProfile',\n  options: {\n    fields: ['id', 'name', 'accounts{id,name,instagram_business_account}'],\n  },\n});\n```\n\n**Important Notes:**\n- Testing: You can test business permissions with test users and development apps without App Review\n- Production: Most business permissions require Facebook App Review before going live\n- Rate Limits: Business APIs have different rate limits - review Facebook's documentation\n- Setup: Follow [Facebook Business Integration Guide](https://developers.facebook.com/docs/development/create-an-app/app-dashboard/business-integrations)\n\n### Android configuration\n\nMore information can be found here: https://developers.facebook.com/docs/android/getting-started\n\nThen call the `initialize` method with the `facebook` provider\n\n```typescript\nawait SocialLogin.initialize({\n  facebook: {\n    appId: 'your-app-id',\n    clientToken: 'your-client-token',\n  },\n});\nconst res = await SocialLogin.login({\n  provider: 'facebook',\n  options: {\n    permissions: ['email', 'public_profile'],\n  },\n});\n```\n\n### iOS configuration\n\nIn file `ios/App/App/AppDelegate.swift` add or replace the following:\n\n```swift\nimport UIKit\nimport Capacitor\nimport FBSDKCoreKit\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n    var window: UIWindow?\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -\u003e Bool {\n        // Override point for customization after application launch.\n        FBSDKCoreKit.ApplicationDelegate.shared.application(\n            application,\n            didFinishLaunchingWithOptions: launchOptions\n        )\n\n        return true\n    }\n\n    ...\n\n    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -\u003e Bool {\n        // Called when the app was launched with a url. Feel free to add additional processing here,\n        // but if you want the App API to support tracking app url opens, make sure to keep this call\n        if (FBSDKCoreKit.ApplicationDelegate.shared.application(\n            app,\n            open: url,\n            sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String,\n            annotation: options[UIApplication.OpenURLOptionsKey.annotation]\n        )) {\n            return true;\n        } else {\n            return ApplicationDelegateProxy.shared.application(app, open: url, options: options)\n        }\n    }\n}\n\n```\n\nAdd the following in the `ios/App/App/info.plist` file inside of the outermost `\u003cdict\u003e`:\n\n```xml\n\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\u003carray\u003e\n    \u003cdict\u003e\n        \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n        \u003carray\u003e\n            \u003cstring\u003efb[APP_ID]\u003c/string\u003e\n        \u003c/array\u003e\n    \u003c/dict\u003e\n\u003c/array\u003e\n\u003ckey\u003eFacebookAppID\u003c/key\u003e\n\u003cstring\u003e[APP_ID]\u003c/string\u003e\n\u003ckey\u003eFacebookClientToken\u003c/key\u003e\n\u003cstring\u003e[CLIENT_TOKEN]\u003c/string\u003e\n\u003ckey\u003eFacebookDisplayName\u003c/key\u003e\n\u003cstring\u003e[APP_NAME]\u003c/string\u003e\n\u003ckey\u003eLSApplicationQueriesSchemes\u003c/key\u003e\n\u003carray\u003e\n    \u003cstring\u003efbapi\u003c/string\u003e\n    \u003cstring\u003efbauth\u003c/string\u003e\n    \u003cstring\u003efb-messenger-share-api\u003c/string\u003e\n    \u003cstring\u003efbauth2\u003c/string\u003e\n    \u003cstring\u003efbshareextension\u003c/string\u003e\n\u003c/array\u003e\n```\n\nMore information can be found here: https://developers.facebook.com/docs/facebook-login/ios\n\n\nThen call the `initialize` method with the `facebook` provider\n\n```typescript\nawait SocialLogin.initialize({\n  facebook: {\n    appId: 'your-app-id',\n  },\n});\nconst res = await SocialLogin.login({\n  provider: 'facebook',\n  options: {\n    permissions: ['email', 'public_profile'],\n  },\n});\n```\n\n## Google\n\n[How to get the credentials](https://github.com/Cap-go/capacitor-social-login/blob/main/docs/setup_google.md)\n\n### Complete Configuration Example\n\nFor Google login to work properly across all platforms, you need different client IDs and must understand the requirements for each mode:\n\n```typescript\nawait SocialLogin.initialize({\n  google: {\n    webClientId: 'YOUR_WEB_CLIENT_ID',        // Required for Android and Web\n    iOSClientId: 'YOUR_IOS_CLIENT_ID',        // Required for iOS  \n    iOSServerClientId: 'YOUR_WEB_CLIENT_ID',  // Required for iOS offline mode and server authorization (same as webClientId)\n    mode: 'online',  // 'online' or 'offline'\n  }\n});\n```\n\n**Important Notes:**\n- `webClientId`: Required for Android and Web platforms\n- `iOSClientId`: Required for iOS platform  \n- `iOSServerClientId`: Required when using `mode: 'offline'` on iOS or when you need to verify the token on the server (should be the same value as `webClientId`)\n- `mode: 'offline'`: Returns only `serverAuthCode` for backend authentication, no user profile data\n- `mode: 'online'`: Returns user profile data and access tokens (default)\n\n### Android configuration\n\nThe implementation use the new library of Google who use Google account at Os level, make sure your device does have at least one google account connected\n\nCall the `initialize` method with the `google` provider:\n\n```typescript\nawait SocialLogin.initialize({\n  google: {\n    webClientId: 'your-web-client-id', // Required: the web client id for Android and Web\n  },\n});\nconst res = await SocialLogin.login({\n  provider: 'google',\n  options: {\n    scopes: ['email', 'profile'],\n  },\n});\n```\n\n### iOS configuration\n\nCall the `initialize` method with the `google` provider:\n\n```typescript\nawait SocialLogin.initialize({\n  google: {\n    iOSClientId: 'your-ios-client-id',           // Required: the iOS client id\n    iOSServerClientId: 'your-web-client-id',     // Required for offline mode: same as webClientId\n    mode: 'online',  // 'online' for user data, 'offline' for server auth code only\n  },\n});\nconst res = await SocialLogin.login({\n  provider: 'google',\n  options: {\n    scopes: ['email', 'profile'],\n  },\n});\n```\n\n**Offline Mode Behavior:**\nWhen using `mode: 'offline'`, the login response will only contain:\n```typescript\n{\n  provider: 'google',\n  result: {\n    serverAuthCode: 'auth_code_for_backend',\n    responseType: 'offline'\n  }\n  // Note: No user profile data is returned in offline mode\n}\n```\n\n### Web\n\nInitialize method to create a script tag with Google lib. We cannot know when it's ready so be sure to do it early in web otherwise it will fail.\n\n## OAuth2 (Generic)\n\nThe plugin supports generic OAuth2 authentication, allowing you to integrate with any OAuth2-compliant provider (GitHub, Azure AD, Auth0, Okta, custom servers, etc.). You can configure multiple OAuth2 providers simultaneously.\n\n### Multi-Provider Configuration\n\n```typescript\nawait SocialLogin.initialize({\n  oauth2: {\n    // GitHub OAuth2\n    github: {\n      appId: 'your-github-client-id',\n      authorizationBaseUrl: 'https://github.com/login/oauth/authorize',\n      accessTokenEndpoint: 'https://github.com/login/oauth/access_token',\n      redirectUrl: 'myapp://oauth/github',\n      scope: 'read:user user:email',\n      pkceEnabled: true,\n    },\n    // Azure AD OAuth2\n    azure: {\n      appId: 'your-azure-client-id',\n      authorizationBaseUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',\n      accessTokenEndpoint: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',\n      redirectUrl: 'myapp://oauth/azure',\n      scope: 'openid profile email',\n      pkceEnabled: true,\n      resourceUrl: 'https://graph.microsoft.com/v1.0/me',\n    },\n    // Auth0 OAuth2\n    auth0: {\n      appId: 'your-auth0-client-id',\n      authorizationBaseUrl: 'https://your-tenant.auth0.com/authorize',\n      accessTokenEndpoint: 'https://your-tenant.auth0.com/oauth/token',\n      redirectUrl: 'myapp://oauth/auth0',\n      scope: 'openid profile email offline_access',\n      pkceEnabled: true,\n      additionalParameters: {\n        audience: 'https://your-api.example.com',\n      },\n    },\n  },\n});\n```\n\n## Auth Connect Presets (Auth0, Azure AD, Cognito, Okta, OneLogin)\n\nIf you want the same provider names as Ionic Auth Connect, use the preset wrapper. It maps those providers to the existing OAuth2 engine.\n\n```typescript\nimport { SocialLoginAuthConnect } from '@capgo/capacitor-social-login';\n\nawait SocialLoginAuthConnect.initialize({\n  authConnect: {\n    auth0: {\n      domain: 'https://your-tenant.auth0.com',\n      clientId: 'your-auth0-client-id',\n      redirectUrl: 'myapp://oauth/auth0',\n      audience: 'https://your-api.example.com',\n    },\n    azure: {\n      tenantId: 'common',\n      clientId: 'your-azure-client-id',\n      redirectUrl: 'myapp://oauth/azure',\n    },\n    okta: {\n      issuer: 'https://dev-12345.okta.com/oauth2/default',\n      clientId: 'your-okta-client-id',\n      redirectUrl: 'myapp://oauth/okta',\n    },\n  },\n});\n\nconst auth0Result = await SocialLoginAuthConnect.login({\n  provider: 'auth0',\n});\n```\n\nNotes:\n- Presets can be overridden: any `oauth2` entry with the same provider key (for example, `oauth2: { auth0: ... }`) overrides the preset for that provider.\n- If your provider uses non-standard endpoints, override `authorizationBaseUrl`, `accessTokenEndpoint`, `resourceUrl`, or `logoutUrl` in the preset.\n\n### Login with a Specific Provider\n\n```typescript\n// Login with GitHub\nconst githubResult = await SocialLogin.login({\n  provider: 'oauth2',\n  options: {\n    providerId: 'github',  // Required: must match key from initialize()\n  },\n});\n\n// Login with Azure AD\nconst azureResult = await SocialLogin.login({\n  provider: 'oauth2',\n  options: {\n    providerId: 'azure',\n    scope: 'openid profile email',  // Optional: override default scopes\n  },\n});\n\nconsole.log('Access Token:', azureResult.result.accessToken?.token);\nconsole.log('ID Token:', azureResult.result.idToken);\nconsole.log('User Data:', azureResult.result.resourceData);\n```\n\n### Check Login Status\n\n```typescript\nconst status = await SocialLogin.isLoggedIn({\n  provider: 'oauth2',\n  providerId: 'github',  // Required for OAuth2\n});\nconsole.log('Is logged in:', status.isLoggedIn);\n```\n\n### Logout\n\n```typescript\nawait SocialLogin.logout({\n  provider: 'oauth2',\n  providerId: 'github',  // Required for OAuth2\n});\n```\n\n### Refresh Token\n\n```typescript\nawait SocialLogin.refresh({\n  provider: 'oauth2',\n  options: {\n    providerId: 'github',  // Required for OAuth2\n  },\n});\n```\n\n### OAuth2 Configuration Options\n\n| Option | Type | Required | Description |\n|--------|------|----------|-------------|\n| `appId` | string | Yes | OAuth2 Client ID |\n| `authorizationBaseUrl` | string | Yes | Authorization endpoint URL |\n| `accessTokenEndpoint` | string | No* | Token endpoint URL (*Required for code flow) |\n| `redirectUrl` | string | Yes | Callback URL for OAuth redirect |\n| `responseType` | 'code' \\| 'token' | No | OAuth flow type (default: 'code') |\n| `pkceEnabled` | boolean | No | Enable PKCE (default: true) |\n| `scope` | string | No | Default scopes to request |\n| `resourceUrl` | string | No | URL to fetch user profile after auth |\n| `additionalParameters` | Record\u003cstring, string\u003e | No | Extra params for authorization URL |\n| `additionalResourceHeaders` | Record\u003cstring, string\u003e | No | Extra headers for resource request |\n| `logoutUrl` | string | No | URL to open on logout |\n| `logsEnabled` | boolean | No | Enable debug logging (default: false) |\n\n### Platform-Specific Notes\n\n**iOS**: Uses `ASWebAuthenticationSession` for secure authentication.\n\n**Android**: Uses a WebView-based authentication flow.\n\n**Web**: Opens a popup window for OAuth flow.\n\n### Security Recommendations\n\n1. **Always use PKCE** (`pkceEnabled: true`) for public clients\n2. **Use authorization code flow** (`responseType: 'code'`) instead of implicit flow\n3. **Store tokens securely** using [@capgo/capacitor-persistent-account](https://github.com/Cap-go/capacitor-persistent-account)\n4. **Use HTTPS** for all endpoints and redirect URLs in production\n\n## Troubleshooting\n\n\n### Invalid Privacy Manifest (ITMS-91056)\nIf you get this error on App Store Connect:\n\n\u003e ITMS-91056: Invalid privacy manifest - The PrivacyInfo.xcprivacy file from the following path is invalid: ...\n\n**How to fix:**\n- Make sure your app's `PrivacyInfo.xcprivacy` is valid JSON, with only Apple-documented keys/values.\n- Do not include a privacy manifest in the plugin, only in your app.\n\n### Google Play Console AD_ID Permission Error\n\n**Problem**: After submitting your app to Google Play, you receive this error:\n```\nGoogle Api Error: Invalid request - This release includes the com.google.android.gms.permission.AD_ID permission\nbut your declaration on Play Console says your app doesn't use advertising ID.\n```\n\n**Root Cause**: The Facebook SDK includes `AD_ID` and other advertising-related permissions.\n\n**Solution**: If you're not using Facebook login, set `facebook: false` in your `capacitor.config.ts`:\n\n```typescript\nconst config: CapacitorConfig = {\n  plugins: {\n    SocialLogin: {\n      providers: {\n        google: true,\n        facebook: false,  // Completely excludes Facebook SDK and its permissions\n        apple: true,\n      },\n    },\n  },\n};\n```\n\nThen run `npx cap sync`. The plugin uses stub classes instead of the real Facebook SDK, so no Facebook dependencies or permissions are included in your build.\n\n### Google Sign-In with Family Link Supervised Accounts\n\n**Problem**: When users try to sign in with Google accounts supervised by Family Link, login fails with:\n```\nNoCredentialException: No credentials available\n```\n\n**Root Cause**: Family Link supervised accounts have different authentication requirements and may not work properly with certain Google Sign-In configurations.\n\n**Solution**: \nWhen implementing Google Sign-In for apps that need to support Family Link accounts, use the following configuration:\n\n```typescript\nimport { SocialLogin } from '@capacitor/social-login';\n\n// For Family Link accounts, disable filtering by authorized accounts\nawait SocialLogin.login({\n  provider: 'google',\n  options: {\n    style: 'bottom', // or 'standard'\n    filterByAuthorizedAccounts: false, // Important for Family Link (default is true)\n    scopes: ['profile', 'email']\n  }\n});\n```\n\n**Key Points**:\n- Set `filterByAuthorizedAccounts` to `false` to ensure Family Link accounts are visible (default is `true`)\n- The plugin will automatically retry with 'standard' style if 'bottom' style fails with NoCredentialException\n- These options only affect Android; iOS handles Family Link accounts normally\n- The error message will suggest disabling `filterByAuthorizedAccounts` if login fails\n\n**Note**: Other apps like Listonic work with Family Link accounts because they use similar configurations. The default settings may be too restrictive for supervised accounts.\n\n## Where to store access tokens?\n\nYou can use the [@capgo/capacitor-persistent-account](https://github.com/Cap-go/capacitor-persistent-account) plugin for this.\n\nThis plugin stores data in secure locations for native devices.\n\nFor Android, it will store data in Android's Account Manager, which provides system-level account management.\nFor iOS, it will store data in the Keychain, which is Apple's secure credential storage.\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`initialize(...)`](#initialize)\n* [`login(...)`](#login)\n* [`logout(...)`](#logout)\n* [`isLoggedIn(...)`](#isloggedin)\n* [`getAuthorizationCode(...)`](#getauthorizationcode)\n* [`refresh(...)`](#refresh)\n* [`refreshToken(...)`](#refreshtoken)\n* [`handleRedirectCallback()`](#handleredirectcallback)\n* [`decodeIdToken(...)`](#decodeidtoken)\n* [`getAccessTokenExpirationDate(...)`](#getaccesstokenexpirationdate)\n* [`isAccessTokenAvailable(...)`](#isaccesstokenavailable)\n* [`isAccessTokenExpired(...)`](#isaccesstokenexpired)\n* [`isRefreshTokenAvailable(...)`](#isrefreshtokenavailable)\n* [`providerSpecificCall(...)`](#providerspecificcall)\n* [`getPluginVersion()`](#getpluginversion)\n* [`openSecureWindow(...)`](#opensecurewindow)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\n### initialize(...)\n\n```typescript\ninitialize(options: InitializeOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nInitialize the plugin\n\n| Param         | Type                                                            |\n| ------------- | --------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#initializeoptions\"\u003eInitializeOptions\u003c/a\u003e\u003c/code\u003e |\n\n--------------------\n\n\n### login(...)\n\n```typescript\nlogin\u003cT extends \"apple\" | \"google\" | \"facebook\" | \"twitter\" | \"oauth2\"\u003e(options: Extract\u003cLoginOptions, { provider: T; }\u003e) =\u003e Promise\u003c{ provider: T; result: ProviderResponseMap[T]; }\u003e\n```\n\nLogin with the selected provider\n\n| Param         | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#extract\"\u003eExtract\u003c/a\u003e\u0026lt;{ provider: 'facebook'; options: \u003ca href=\"#facebookloginoptions\"\u003eFacebookLoginOptions\u003c/a\u003e; }, { provider: T; }\u0026gt; \\| \u003ca href=\"#extract\"\u003eExtract\u003c/a\u003e\u0026lt;{ provider: 'google'; options: \u003ca href=\"#googleloginoptions\"\u003eGoogleLoginOptions\u003c/a\u003e; }, { provider: T; }\u0026gt; \\| \u003ca href=\"#extract\"\u003eExtract\u003c/a\u003e\u0026lt;{ provider: 'apple'; options: \u003ca href=\"#appleprovideroptions\"\u003eAppleProviderOptions\u003c/a\u003e; }, { provider: T; }\u0026gt; \\| \u003ca href=\"#extract\"\u003eExtract\u003c/a\u003e\u0026lt;{ provider: 'twitter'; options: \u003ca href=\"#twitterloginoptions\"\u003eTwitterLoginOptions\u003c/a\u003e; }, { provider: T; }\u0026gt; \\| \u003ca href=\"#extract\"\u003eExtract\u003c/a\u003e\u0026lt;{ provider: 'oauth2'; options: \u003ca href=\"#oauth2loginoptions\"\u003eOAuth2LoginOptions\u003c/a\u003e; }, { provider: T; }\u0026gt;\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ provider: T; result: ProviderResponseMap[T]; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### logout(...)\n\n```typescript\nlogout(options: { provider: 'apple' | 'google' | 'facebook' | 'twitter' | 'oauth2'; providerId?: string; }) =\u003e Promise\u003cvoid\u003e\n```\n\nLogout\n\n| Param         | Type                                                                                                        |\n| ------------- | ----------------------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ provider: 'apple' \\| 'google' \\| 'facebook' \\| 'twitter' \\| 'oauth2'; providerId?: string; }\u003c/code\u003e |\n\n--------------------\n\n\n### isLoggedIn(...)\n\n```typescript\nisLoggedIn(options: isLoggedInOptions) =\u003e Promise\u003c{ isLoggedIn: boolean; }\u003e\n```\n\nIsLoggedIn\n\n| Param         | Type                                                            |\n| ------------- | --------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#isloggedinoptions\"\u003eisLoggedInOptions\u003c/a\u003e\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ isLoggedIn: boolean; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### getAuthorizationCode(...)\n\n```typescript\ngetAuthorizationCode(options: AuthorizationCodeOptions) =\u003e Promise\u003cAuthorizationCode\u003e\n```\n\nGet the current authorization code\n\n| Param         | Type                                                                          |\n| ------------- | ----------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#authorizationcodeoptions\"\u003eAuthorizationCodeOptions\u003c/a\u003e\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#authorizationcode\"\u003eAuthorizationCode\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### refresh(...)\n\n```typescript\nrefresh(options: LoginOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nRefresh the access token\n\n| Param         | Type                                                  |\n| ------------- | ----------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#loginoptions\"\u003eLoginOptions\u003c/a\u003e\u003c/code\u003e |\n\n--------------------\n\n\n### refreshToken(...)\n\n```typescript\nrefreshToken(options: { provider: 'oauth2'; providerId: string; refreshToken?: string; additionalParameters?: Record\u003cstring, string\u003e; }) =\u003e Promise\u003cOAuth2LoginResponse\u003e\n```\n\nOAuth2 refresh-token helper (feature parity with Capawesome OAuth).\n\nScope:\n- Only applies to the built-in `oauth2` provider (not Google/Apple/Facebook/Twitter).\n- Requires a token endpoint (either `accessTokenEndpoint`/`tokenEndpoint` or `issuerUrl` discovery).\n\nSecurity note:\n- This does not validate JWT signatures. It only exchanges/refreshes tokens.\n\nIf `refreshToken` is omitted, the plugin will attempt to use the stored refresh token (if available).\n\n| Param         | Type                                                                                                                                                       |\n| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ provider: 'oauth2'; providerId: string; refreshToken?: string; additionalParameters?: \u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, string\u0026gt;; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#oauth2loginresponse\"\u003eOAuth2LoginResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### handleRedirectCallback()\n\n```typescript\nhandleRedirectCallback() =\u003e Promise\u003cLoginResult | null\u003e\n```\n\nWeb-only: handle the OAuth redirect callback and return the parsed result.\n\nNotes:\n- This is only meaningful on Web. iOS/Android implementations will reject.\n- Intended for redirect-based flows (e.g. `oauth2` with `flow: 'redirect'`) where the page navigates away.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#loginresult\"\u003eLoginResult\u003c/a\u003e | null\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### decodeIdToken(...)\n\n```typescript\ndecodeIdToken(options: { idToken?: string; token?: string; }) =\u003e Promise\u003c{ claims: Record\u003cstring, any\u003e; }\u003e\n```\n\nDecode a JWT (typically an OIDC ID token) into its claims.\n\nNotes:\n- Accepts both `idToken` and `token` to match common naming (Capawesome uses `token`).\n- This does not validate the signature or issuer/audience. It only base64url-decodes the payload.\n\n| Param         | Type                                               |\n| ------------- | -------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ idToken?: string; token?: string; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ claims: \u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, any\u0026gt;; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### getAccessTokenExpirationDate(...)\n\n```typescript\ngetAccessTokenExpirationDate(options: { accessTokenExpirationDate: number; }) =\u003e Promise\u003c{ date: string; }\u003e\n```\n\nConvert an access token expiration timestamp (milliseconds since epoch) to an ISO date string.\n\nThis is a pure helper (feature parity with Capawesome OAuth) and does not depend on provider state.\n\n| Param         | Type                                                |\n| ------------- | --------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ accessTokenExpirationDate: number; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ date: string; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### isAccessTokenAvailable(...)\n\n```typescript\nisAccessTokenAvailable(options: { accessToken: string | null; }) =\u003e Promise\u003c{ isAvailable: boolean; }\u003e\n```\n\nCheck if an access token is available (non-empty).\n\nThis is a pure helper (feature parity with Capawesome OAuth) and does not depend on provider state.\n\n| Param         | Type                                          |\n| ------------- | --------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ accessToken: string \\| null; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ isAvailable: boolean; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### isAccessTokenExpired(...)\n\n```typescript\nisAccessTokenExpired(options: { accessTokenExpirationDate: number; }) =\u003e Promise\u003c{ isExpired: boolean; }\u003e\n```\n\nCheck if an access token is expired.\n\nThis is a pure helper (feature parity with Capawesome OAuth) and does not depend on provider state.\n\n| Param         | Type                                                |\n| ------------- | --------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ accessTokenExpirationDate: number; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ isExpired: boolean; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### isRefreshTokenAvailable(...)\n\n```typescript\nisRefreshTokenAvailable(options: { refreshToken: string | null; }) =\u003e Promise\u003c{ isAvailable: boolean; }\u003e\n```\n\nCheck if a refresh token is available (non-empty).\n\nThis is a pure helper (feature parity with Capawesome OAuth) and does not depend on provider state.\n\n| Param         | Type                                           |\n| ------------- | ---------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ refreshToken: string \\| null; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ isAvailable: boolean; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### providerSpecificCall(...)\n\n```typescript\nproviderSpecificCall\u003cT extends ProviderSpecificCall\u003e(options: { call: T; options: ProviderSpecificCallOptionsMap[T]; }) =\u003e Promise\u003cProviderSpecificCallResponseMap[T]\u003e\n```\n\nExecute provider-specific calls\n\n| Param         | Type                                                                  |\n| ------------- | --------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ call: T; options: ProviderSpecificCallOptionsMap[T]; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;ProviderSpecificCallResponseMap[T]\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### getPluginVersion()\n\n```typescript\ngetPluginVersion() =\u003e Promise\u003c{ version: string; }\u003e\n```\n\nGet the native Capacitor plugin version\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ version: string; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### openSecureWindow(...)\n\n```typescript\nopenSecureWindow(options: OpenSecureWindowOptions) =\u003e Promise\u003cOpenSecureWindowResponse\u003e\n```\n\nOpens a secured window for OAuth2 authentication.\nFor web, you should have the code in the redirected page to use a broadcast channel to send the redirected url to the app\nSomething like:\n```html\n\u0026lt;html\u0026gt;\n\u0026lt;head\u0026gt;\u0026lt;/head\u0026gt;\n\u0026lt;body\u0026gt;\n\u0026lt;script\u0026gt;\n  const searchParams = new URLSearchParams(location.search)\n  if (searchParams.has(\"code\")) {\n    new BroadcastChannel(\"my-channel-name\").postMessage(location.href);\n    window.close();\n  }\n\u0026lt;/script\u0026gt;\n\u0026lt;/body\u0026gt;\n\u0026lt;/html\u0026gt;\n```\nFor mobile, you should have a redirect uri that opens the app, something like: `myapp://oauth_callback/`\nAnd make sure to register it in the app's info.plist:\n```xml\n\u0026lt;key\u0026gt;CFBundleURLTypes\u0026lt;/key\u0026gt;\n\u0026lt;array\u0026gt;\n   \u0026lt;dict\u0026gt;\n      \u0026lt;key\u0026gt;CFBundleURLSchemes\u0026lt;/key\u0026gt;\n      \u0026lt;array\u0026gt;\n         \u0026lt;string\u0026gt;myapp\u0026lt;/string\u0026gt;\n      \u0026lt;/array\u0026gt;\n   \u0026lt;/dict\u0026gt;\n\u0026lt;/array\u0026gt;\n```\nAnd in the AndroidManifest.xml file:\n```xml\n\u0026lt;activity\u0026gt;\n   \u0026lt;intent-filter\u0026gt;\n      \u0026lt;action android:name=\"android.intent.action.VIEW\" /\u0026gt;\n      \u0026lt;category android:name=\"android.intent.category.DEFAULT\" /\u0026gt;\n      \u0026lt;category android:name=\"android.intent.category.BROWSABLE\" /\u0026gt;\n      \u0026lt;data android:host=\"oauth_callback\" android:scheme=\"myapp\" /\u0026gt;\n   \u0026lt;/intent-filter\u0026gt;\n\u0026lt;/activity\u0026gt;\n```\n\n| Param         | Type                                                                        | Description                                 |\n| ------------- | --------------------------------------------------------------------------- | ------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#opensecurewindowoptions\"\u003eOpenSecureWindowOptions\u003c/a\u003e\u003c/code\u003e | - the options for the openSecureWindow call |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#opensecurewindowresponse\"\u003eOpenSecureWindowResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### Interfaces\n\n\n#### InitializeOptions\n\n| Prop           | Type                                                                                                                                                                | Description                                                                                                                    |\n| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| **`oauth2`**   | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, \u003ca href=\"#oauth2providerconfig\"\u003eOAuth2ProviderConfig\u003c/a\u003e\u0026gt;\u003c/code\u003e                                                   | OAuth2 provider configurations. Supports multiple providers by using a \u003ca href=\"#record\"\u003eRecord\u003c/a\u003e with provider IDs as keys. |\n| **`twitter`**  | \u003ccode\u003e{ clientId: string; redirectUrl: string; defaultScopes?: string[]; forceLogin?: boolean; audience?: string; }\u003c/code\u003e                                          |                                                                                                                                |\n| **`facebook`** | \u003ccode\u003e{ appId: string; clientToken?: string; locale?: string; }\u003c/code\u003e                                                                                              |                                                                                                                                |\n| **`google`**   | \u003ccode\u003e{ iOSClientId?: string; iOSServerClientId?: string; webClientId?: string; mode?: 'online' \\| 'offline'; hostedDomain?: string; redirectUrl?: string; }\u003c/code\u003e |                                                                                                                                |\n| **`apple`**    | \u003ccode\u003e{ clientId?: string; redirectUrl?: string; useProperTokenExchange?: boolean; useBroadcastChannel?: boolean; }\u003c/code\u003e                                          |                                                                                                                                |\n\n\n#### OAuth2ProviderConfig\n\nConfiguration for a single OAuth2 provider instance\n\n| Prop                                       | Type                                                            | Description                                                                                                                                                                                                                                                                                                                                              | Default             |\n| ------------------------------------------ | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |\n| **`appId`**                                | \u003ccode\u003estring\u003c/code\u003e                                             | The OAuth 2.0 client identifier (App ID / Client ID). Note: this configuration object is only used by the plugin's built-in `oauth2` provider (i.e. `SocialLogin.initialize({ oauth2: { ... } })`). It does not affect Google/Apple/Facebook/Twitter.                                                                                                    |                     |\n| **`clientId`**                             | \u003ccode\u003estring\u003c/code\u003e                                             | Alias for `appId` to match common OAuth/OIDC naming (`clientId`). If both are provided, `appId` takes precedence.                                                                                                                                                                                                                                        |                     |\n| **`issuerUrl`**                            | \u003ccode\u003estring\u003c/code\u003e                                             | OpenID Connect issuer URL (enables discovery via `/.well-known/openid-configuration`). When set, you may omit explicit endpoints like `authorizationBaseUrl` and `accessTokenEndpoint`. Notes: - Explicit endpoints (authorization/token/logout) take precedence over discovered values. - Discovery is supported for `oauth2` on Web, iOS, and Android. |                     |\n| **`authorizationBaseUrl`**                 | \u003ccode\u003estring\u003c/code\u003e                                             | The base URL of the authorization endpoint                                                                                                                                                                                                                                                                                                               |                     |\n| **`authorizationEndpoint`**                | \u003ccode\u003estring\u003c/code\u003e                                             | Alias for `authorizationBaseUrl` (to match common OAuth/OIDC naming).                                                                                                                                                                                                                                                                                    |                     |\n| **`accessTokenEndpoint`**                  | \u003ccode\u003estring\u003c/code\u003e                                             | The URL to exchange the authorization code for tokens Required for authorization code flow                                                                                                                                                                                                                                                               |                     |\n| **`tokenEndpoint`**                        | \u003ccode\u003estring\u003c/code\u003e                                             | Alias for `accessTokenEndpoint` (to match common OAuth/OIDC naming).                                                                                                                                                                                                                                                                                     |                     |\n| **`redirectUrl`**                          | \u003ccode\u003estring\u003c/code\u003e                                             | Redirect URL that receives the OAuth callback                                                                                                                                                                                                                                                                                                            |                     |\n| **`resourceUrl`**                          | \u003ccode\u003estring\u003c/code\u003e                                             | Optional URL to fetch user profile/resource data after authentication The access token will be sent as Bearer token in the Authorization header                                                                                                                                                                                                          |                     |\n| **`responseType`**                         | \u003ccode\u003e'code' \\| 'token'\u003c/code\u003e                                  | The OAuth response type - 'code': Authorization Code flow (recommended, requires accessTokenEndpoint) - 'token': Implicit flow (less secure, tokens returned directly)                                                                                                                                                                                   | \u003ccode\u003e'code'\u003c/code\u003e |\n| **`pkceEnabled`**                          | \u003ccode\u003eboolean\u003c/code\u003e                                            | Enable PKCE (Proof Key for Code Exchange) Strongly recommended for public clients (mobile/web apps)                                                                                                                                                                                                                                                      | \u003ccode\u003etrue\u003c/code\u003e   |\n| **`scope`**                                | \u003ccode\u003estring \\| string[]\u003c/code\u003e                                 | Default scopes to request during authorization                                                                                                                                                                                                                                                                                                           |                     |\n| **`scopes`**                               | \u003ccode\u003estring[]\u003c/code\u003e                                           | Alias for `scope` using common naming (`scopes`). If both are provided, `scope` takes precedence.                                                                                                                                                                                                                                                        |                     |\n| **`additionalParameters`**                 | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, string\u0026gt;\u003c/code\u003e | Additional parameters to include in the authorization request                                                                                                                                                                                                                                                                                            |                     |\n| **`loginHint`**                            | \u003ccode\u003estring\u003c/code\u003e                                             | Convenience option for OIDC `login_hint`. Equivalent to passing `additionalParameters.login_hint`.                                                                                                                                                                                                                                                       |                     |\n| **`prompt`**                               | \u003ccode\u003estring\u003c/code\u003e                                             | Convenience option for OAuth/OIDC `prompt`. Equivalent to passing `additionalParameters.prompt`.                                                                                                                                                                                                                                                         |                     |\n| **`additionalTokenParameters`**            | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, string\u0026gt;\u003c/code\u003e | Additional parameters to include in token requests (code exchange / refresh). Useful for providers that require non-standard parameters.                                                                                                                                                                                                                 |                     |\n| **`additionalResourceHeaders`**            | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, string\u0026gt;\u003c/code\u003e | Additional headers to include when fetching the resource URL                                                                                                                                                                                                                                                                                             |                     |\n| **`logoutUrl`**                            | \u003ccode\u003estring\u003c/code\u003e                                             | Custom logout URL for ending the session                                                                                                                                                                                                                                                                                                                 |                     |\n| **`endSessionEndpoint`**                   | \u003ccode\u003estring\u003c/code\u003e                                             | Alias for `logoutUrl` to match OIDC naming (`endSessionEndpoint`).                                                                                                                                                                                                                                                                                       |                     |\n| **`postLogoutRedirectUrl`**                | \u003ccode\u003estring\u003c/code\u003e                                             | OIDC post logout redirect URL (sent as `post_logout_redirect_uri` when building the end-session URL).                                                                                                                                                                                                                                                    |                     |\n| **`additionalLogoutParameters`**           | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, string\u0026gt;\u003c/code\u003e | Additional parameters to include in logout / end-session URL.                                                                                                                                                                                                                                                                                            |                     |\n| **`iosPrefersEphemeralWebBrowserSession`** | \u003ccode\u003eboolean\u003c/code\u003e                                            | iOS-only: Whether to prefer an ephemeral browser session for ASWebAuthenticationSession. Defaults to true to match existing behavior in this plugin.                                                                                                                                                                                                     |                     |\n| **`iosPrefersEphemeralSession`**           | \u003ccode\u003eboolean\u003c/code\u003e                                            | Alias for `iosPrefersEphemeralWebBrowserSession` (to match Capawesome OAuth naming).                                                                                                                                                                                                                                                                     |                     |\n| **`logsEnabled`**                          | \u003ccode\u003eboolean\u003c/code\u003e                                            | Enable debug logging                                                                                                                                                                                                                                                                                                                                     | \u003ccode\u003efalse\u003c/code\u003e  |\n\n\n#### FacebookLoginResponse\n\n| Prop              | Type                                                                                                                                                                                                                                                                                                                                                            |\n| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`accessToken`** | \u003ccode\u003e\u003ca href=\"#accesstoken\"\u003eAccessToken\u003c/a\u003e \\| null\u003c/code\u003e                                                                                                                                                                                                                                                                                                     |\n| **`idToken`**     | \u003ccode\u003estring \\| null\u003c/code\u003e                                                                                                                                                                                                                                                                                                                                     |\n| **`profile`**     | \u003ccode\u003e{ userID: string; email: string \\| null; friendIDs: string[]; birthday: string \\| null; ageRange: { min?: number; max?: number; } \\| null; gender: string \\| null; location: { id: string; name: string; } \\| null; hometown: { id: string; name: string; } \\| null; profileURL: string \\| null; name: string \\| null; imageURL: string \\| null; }\u003c/code\u003e |\n\n\n#### AccessToken\n\n| Prop                      | Type                  |\n| ------------------------- | --------------------- |\n| **`applicationId`**       | \u003ccode\u003estring\u003c/code\u003e   |\n| **`declinedPermissions`** | \u003ccode\u003estring[]\u003c/code\u003e |\n| **`expires`**             | \u003ccode\u003estring\u003c/code\u003e   |\n| **`isExpired`**           | \u003ccode\u003eboolean\u003c/code\u003e  |\n| **`lastRefresh`**         | \u003ccode\u003estring\u003c/code\u003e   |\n| **`permissions`**         | \u003ccode\u003estring[]\u003c/code\u003e |\n| **`token`**               | \u003ccode\u003estring\u003c/code\u003e   |\n| **`tokenType`**           | \u003ccode\u003estring\u003c/code\u003e   |\n| **`refreshToken`**        | \u003ccode\u003estring\u003c/code\u003e   |\n| **`userId`**              | \u003ccode\u003estring\u003c/code\u003e   |\n\n\n#### GoogleLoginResponseOnline\n\n| Prop               | Type                                                                                                                                                               |\n| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| **`accessToken`**  | \u003ccode\u003e\u003ca href=\"#accesstoken\"\u003eAccessToken\u003c/a\u003e \\| null\u003c/code\u003e                                                                                                        |\n| **`idToken`**      | \u003ccode\u003estring \\| null\u003c/code\u003e                                                                                                                                        |\n| **`profile`**      | \u003ccode\u003e{ email: string \\| null; familyName: string \\| null; givenName: string \\| null; id: string \\| null; name: string \\| null; imageUrl: string \\| null; }\u003c/code\u003e |\n| **`responseType`** | \u003ccode\u003e'online'\u003c/code\u003e                                                                                                                                              |\n\n\n#### GoogleLoginResponseOffline\n\n| Prop                 | Type                   |\n| -------------------- | ---------------------- |\n| **`serverAuthCode`** | \u003ccode\u003estring\u003c/code\u003e    |\n| **`responseType`**   | \u003ccode\u003e'offline'\u003c/code\u003e |\n\n\n#### AppleProviderResponse\n\n| Prop                    | Type                                                                                                         | Description                                                                           |\n| ----------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |\n| **`accessToken`**       | \u003ccode\u003e\u003ca href=\"#accesstoken\"\u003eAccessToken\u003c/a\u003e \\| null\u003c/code\u003e                                                  | Access token from Apple                                                               |\n| **`idToken`**           | \u003ccode\u003estring \\| null\u003c/code\u003e                                                                                  | Identity token (JWT) from Apple                                                       |\n| **`profile`**           | \u003ccode\u003e{ user: string; email: string \\| null; givenName: string \\| null; familyName: string \\| null; }\u003c/code\u003e | User profile information                                                              |\n| **`authorizationCode`** | \u003ccode\u003estring\u003c/code\u003e                                                                                          | Authorization code for proper token exchange (when useProperTokenExchange is enabled) |\n\n\n#### TwitterLoginResponse\n\n| Prop               | Type                                                        |\n| ------------------ | ----------------------------------------------------------- |\n| **`accessToken`**  | \u003ccode\u003e\u003ca href=\"#accesstoken\"\u003eAccessToken\u003c/a\u003e \\| null\u003c/code\u003e |\n| **`refreshToken`** | \u003ccode\u003estring \\| null\u003c/code\u003e                                 |\n| **`scope`**        | \u003ccode\u003estring[]\u003c/code\u003e                                       |\n| **`tokenType`**    | \u003ccode\u003e'bearer'\u003c/code\u003e                                       |\n| **`expiresIn`**    | \u003ccode\u003enumber \\| null\u003c/code\u003e                                 |\n| **`profile`**      | \u003ccode\u003e\u003ca href=\"#twitterprofile\"\u003eTwitterProfile\u003c/a\u003e\u003c/code\u003e   |\n\n\n#### TwitterProfile\n\n| Prop                  | Type                        |\n| --------------------- | --------------------------- |\n| **`id`**              | \u003ccode\u003estring\u003c/code\u003e         |\n| **`username`**        | \u003ccode\u003estring\u003c/code\u003e         |\n| **`name`**            | \u003ccode\u003estring \\| null\u003c/code\u003e |\n| **`profileImageUrl`** | \u003ccode\u003estring \\| null\u003c/code\u003e |\n| **`verified`**        | \u003ccode\u003eboolean\u003c/code\u003e        |\n| **`email`**           | \u003ccode\u003estring \\| null\u003c/code\u003e |\n\n\n#### OAuth2LoginResponse\n\n| Prop               | Type                                                                     | Description                                                                                                    |\n| ------------------ | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| **`providerId`**   | \u003ccode\u003estring\u003c/code\u003e                                                      | The provider ID that was used for this login                                                                   |\n| **`accessToken`**  | \u003ccode\u003e\u003ca href=\"#accesstoken\"\u003eAccessToken\u003c/a\u003e \\| null\u003c/code\u003e              | The access token received from the OAuth provider                                                              |\n| **`idToken`**      | \u003ccode\u003estring \\| null\u003c/code\u003e                                              | The ID token (JWT) if provided by the OAuth server (e.g., OpenID Connect)                                      |\n| **`refreshToken`** | \u003ccode\u003estring \\| null\u003c/code\u003e                                              | The refresh token if provided (requires appropriate scope like offline_access)                                 |\n| **`resourceData`** | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt; \\| null\u003c/code\u003e | Resource data fetched from resourceUrl if configured Contains the raw JSON response from the resource endpoint |\n| **`scope`**        | \u003ccode\u003estring[]\u003c/code\u003e                                                    | The scopes that were granted                                                                                   |\n| **`tokenType`**    | \u003ccode\u003estring\u003c/code\u003e                                                      | Token type (usually 'bearer')                                                                                  |\n| **`expiresIn`**    | \u003ccode\u003enumber \\| null\u003c/code\u003e                                              | Token expiration time in seconds                                                                               |\n\n\n#### FacebookLoginOptions\n\n| Prop               | Type                  | Description      | Default            |\n| ------------------ | --------------------- | ---------------- | ------------------ |\n| **`permissions`**  | \u003ccode\u003estring[]\u003c/code\u003e | Permissions      |                    |\n| **`limitedLogin`** | \u003ccode\u003eboolean\u003c/code\u003e  | Is Limited Login | \u003ccode\u003efalse\u003c/code\u003e |\n| **`nonce`**        | \u003ccode\u003estring\u003c/code\u003e   | Nonce            |                    |\n\n\n#### GoogleLoginOptions\n\n| Prop                             | Type                                                                                                         | Description                                                                                          | Default                 | Since  |\n| -------------------------------- | ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | ----------------------- | ------ |\n| **`scopes`**                     | \u003ccode\u003estring[]\u003c/code\u003e                                                                                        | Specifies the scopes required for accessing Google APIs The default is defined in the configuration. |                         |        |\n| **`nonce`**                      | \u003ccode\u003estring\u003c/code\u003e                                                                                          | Nonce                                                                                                |                         |        |\n| **`forceRefreshToken`**          | \u003ccode\u003eboolean\u003c/code\u003e                                                                                         | Force refresh token (only for Android)                                                               | \u003ccode\u003efalse\u003c/code\u003e      |        |\n| **`forcePrompt`**                | \u003ccode\u003eboolean\u003c/code\u003e                                                                                         | Force account selection prompt (iOS)                                                                 | \u003ccode\u003efalse\u003c/code\u003e      |        |\n| **`style`**                      | \u003ccode\u003e'bottom' \\| 'standard'\u003c/code\u003e                                                                          | Style                                                                                                | \u003ccode\u003e'standard'\u003c/code\u003e |        |\n| **`filterByAuthorizedAccounts`** | \u003ccode\u003eboolean\u003c/code\u003e                                                                                         | Filter by authorized accounts (Android only)                                                         | \u003ccode\u003etrue\u003c/code\u003e       |        |\n| **`autoSelectEnabled`**          | \u003ccode\u003eboolean\u003c/code\u003e                                                                                         | Auto select enabled (Android only)                                                                   | \u003ccode\u003efalse\u003c/code\u003e      |        |\n| **`prompt`**                     | \u003ccode\u003e'none' \\| 'consent' \\| 'select_account' \\| 'consent select_account' \\| 'select_account consent'\u003c/code\u003e | Prompt parameter for Google OAuth (Web only)                                                         |                         | 7.12.0 |\n\n\n#### AppleProviderOptions\n\n| Prop                      | Type                  | Description                                   | Default            |\n| ------------------------- | --------------------- | --------------------------------------------- | ------------------ |\n| **`scopes`**              | \u003ccode\u003estring[]\u003c/code\u003e | Scopes                                        |                    |\n| **`nonce`**               | \u003ccode\u003estring\u003c/code\u003e   | Nonce                                         |                    |\n| **`state`**               | \u003ccode\u003estring\u003c/code\u003e   | State                                         |                    |\n| **`useBroadcastChannel`** | \u003ccode\u003eboolean\u003c/code\u003e  | Use Broadcast Channel for authentication flow | \u003ccode\u003efalse\u003c/code\u003e |\n\n\n#### TwitterLoginOptions\n\n| Prop               | Type                  | Description                                                                                                                             |\n| ------------------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| **`scopes`**       | \u003ccode\u003estring[]\u003c/code\u003e | Additional scopes to request during login. If omitted the plugin falls back to the default scopes configured during initialization.     |\n| **`state`**        | \u003ccode\u003estring\u003c/code\u003e   | Provide a custom OAuth state value. When not provided the plugin generates a cryptographically random value.                            |\n| **`codeVerifier`** | \u003ccode\u003estring\u003c/code\u003e   | Provide a pre-computed PKCE code verifier (mostly used for testing). When omitted the plugin generates a secure verifier automatically. |\n| **`redirectUrl`**  | \u003ccode\u003estring\u003c/code\u003e   | Override the redirect URI for a single login call. Useful when the same app supports multiple callback URLs per platform.               |\n| **`forceLogin`**   | \u003ccode\u003eboolean\u003c/code\u003e  | Force the consent screen on every attempt, maps to `force_login=true`.                                                                  |\n\n\n#### OAuth2LoginOptions\n\n| Prop                       | Type                                                            | Description                                                                                                                                                                                                                                                                                                                | Default              |\n| -------------------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\n| **`providerId`**           | \u003ccode\u003estring\u003c/code\u003e                                             | The provider ID as configured in initialize() This is required to identify which OAuth2 provider to use                                                                                                                                                                                                                    |                      |\n| **`scope`**                | \u003ccode\u003estring \\| string[]\u003c/code\u003e                                 | Override the scopes for this login request If not provided, uses the scopes from initialization                                                                                                                                                                                                                            |                      |\n| **`scopes`**               | \u003ccode\u003estring[]\u003c/code\u003e                                           | Alias for `scope` using common naming (`scopes`). If both are provided, `scope` takes precedence.                                                                                                                                                                                                                          |                      |\n| **`state`**                | \u003ccode\u003estring\u003c/code\u003e                                             | Custom state parameter for CSRF protection If not provided, a random value is generated                                                                                                                                                                                                                                    |                      |\n| **`codeVerifier`**         | \u003ccode\u003estring\u003c/code\u003e                                             | Override PKCE code verifier (for testing purposes) If not provided, a secure random verifier is generated                                                                                                                                                                                                                  |                      |\n| **`redirectUrl`**          | \u003ccode\u003estring\u003c/code\u003e                                             | Override redirect URL for this login request                                                                                                                                                                                                                                                                               |                      |\n| **`additionalParameters`** | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, string\u0026gt;\u003c/code\u003e | Additional parameters to add to the authorization URL                                                                                                                                                                                                                                                                      |                      |\n| **`loginHint`**            | \u003ccode\u003estring\u003c/code\u003e                                             | Convenience option for OIDC `login_hint`. Equivalent to passing `additionalParameters.login_hint`.                                                                                                                                                                                                                         |                      |\n| **`prompt`**               | \u003ccode\u003estring\u003c/code\u003e                                             | Convenience option for OAuth/OIDC `prompt`. Equivalent to passing `additionalParameters.prompt`.                                                                                                                                                                                                                           |                      |\n| **`flow`**                 | \u003ccode\u003e'popup' \\| 'redirect'\u003c/code\u003e                              | Web-only (`oauth2` provider only): Use a full-page redirect instead of a popup window. When using `redirect`, the promise returned by `login()` will not resolve because the page navigates away. After the redirect lands back in your app, call `SocialLogin.handleRedirectCallback()` on that page to parse the result. | \u003ccode\u003e'popup'\u003c/code\u003e |\n\n\n#### isLoggedInOptions\n\n| Prop             | Type                                                                    | Description                                                           |\n| ---------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------- |\n| **`provider`**   | \u003ccode\u003e'apple' \\| 'google' \\| 'facebook' \\| 'twitter' \\| 'oauth2'\u003c/code\u003e | Provider                                                              |\n| **`providerId`** | \u003ccode\u003estring\u003c/code\u003e                                                     | Provider ID for OAuth2 providers (required when provider is 'oauth2') |\n\n\n#### AuthorizationCode\n\n| Prop              | Type                | Description  |\n| ----------------- | ------------------- | ------------ |\n| **`jwt`**         | \u003ccode\u003estring\u003c/code\u003e | Jwt          |\n| **`accessToken`** | \u003ccode\u003estring\u003c/code\u003e | Access Token |\n\n\n#### AuthorizationCodeOptions\n\n| Prop             | Type                                                                    | Description                                                           |\n| ---------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------- |\n| **`provider`**   | \u003ccode\u003e'apple' \\| 'google' \\| 'facebook' \\| 'twitter' \\| 'oauth2'\u003c/code\u003e | Provider                                                              |\n| **`providerId`** | \u003ccode\u003estring\u003c/code\u003e                                                     | Provider ID for OAuth2 providers (required when provider is 'oauth2') |\n\n\n#### FacebookGetProfileResponse\n\n| Prop          | Type                                                                                                                                                                                                                                                                                               | Description           |\n| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |\n| **`profile`** | \u003ccode\u003e{ [key: string]: any; id: string \\| null; name: string \\| null; email: string \\| null; first_name: string \\| null; last_name: string \\| null; picture?: { data: { height: number \\| null; is_silhouette: boolean \\| null; url: string \\| null; width: number \\| null; }; } \\| null; }\u003c/code\u003e | Facebook profile data |\n\n\n#### FacebookRequestTrackingResponse\n\n| Prop         | Type                                                                     | Description                       |\n| ------------ | ------------------------------------------------------------------------ | --------------------------------- |\n| **`status`** | \u003ccode\u003e'authorized' \\| 'denied' \\| 'notDetermined' \\| 'restricted'\u003c/code\u003e | App tracking authorization status |\n\n\n#### FacebookGetProfileOptions\n\n| Prop         | Type                  | Description                              |\n| ------------ | --------------------- | ---------------------------------------- |\n| **`fields`** | \u003ccode\u003estring[]\u003c/code\u003e | Fields to retrieve from Facebook profile |\n\n\n#### OpenSecureWindowResponse\n\n| Prop                | Type                | Description                             |\n| ------------------- | ------------------- | --------------------------------------- |\n| **`redirectedUri`** | \u003ccode\u003estring\u003c/code\u003e | The result of the openSecureWindow call |\n\n\n#### OpenSecureWindowOptions\n\n| Prop                       | Type                | Description                                                                                                                                                     |\n| -------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`authEndpoint`**         | \u003ccode\u003estring\u003c/code\u003e | The endpoint to open                                                                                                                                            |\n| **`redirectUri`**          | \u003ccode\u003estring\u003c/code\u003e | The redirect URI to use for the openSecureWindow call. This will be checked to make sure it matches the redirect URI after the window finishes the redirection. |\n| **`broadcastChannelName`** | \u003ccode\u003estring\u003c/code\u003e | The name of the broadcast channel to listen to, relevant only for web                                                                                           |\n\n\n### Type Aliases\n\n\n#### Record\n\nConstruct a type with a set of properties K of type T\n\n\u003ccode\u003e{\r [P in K]: T;\r }\u003c/code\u003e\n\n\n#### ProviderResponseMap\n\n\u003ccode\u003e{ facebook: \u003ca href=\"#facebookloginresponse\"\u003eFacebookLoginResponse\u003c/a\u003e; google: \u003ca href=\"#googleloginresponse\"\u003eGoogleLoginResponse\u003c/a\u003e; apple: \u003ca href=\"#appleproviderresponse\"\u003eAppleProviderResponse\u003c/a\u003e; twitter: \u003ca href=\"#twitterloginresponse\"\u003eTwitterLoginResponse\u003c/a\u003e; oauth2: \u003ca href=\"#oauth2loginresponse\"\u003eOAuth2LoginResponse\u003c/a\u003e; }\u003c/code\u003e\n\n\n#### GoogleLoginResponse\n\n\u003ccode\u003e\u003ca href=\"#googleloginresponseonline\"\u003eGoogleLoginResponseOnline\u003c/a\u003e | \u003ca href=\"#googleloginresponseoffline\"\u003eGoogleLoginResponseOffline\u003c/a\u003e\u003c/code\u003e\n\n\n#### LoginOptions\n\n\u003ccode\u003e{ provider: 'facebook'; options: \u003ca href=\"#facebookloginoptions\"\u003eFacebookLoginOptions\u003c/a\u003e; } | { provider: 'google'; options: \u003ca href=\"#googleloginoptions\"\u003eGoogleLoginOptions\u003c/a\u003e; } | { provider: 'apple'; options: \u003ca href=\"#appleprovideroptions\"\u003eAppleProviderOptions\u003c/a\u003e; } | { provider: 'twitter'; options: \u003ca href=\"#twitterloginoptions\"\u003eTwitterLoginOptions\u003c/a\u003e; } | { provider: 'oauth2'; options: \u003ca href=\"#oauth2loginoptions\"\u003eOAuth2LoginOptions\u003c/a\u003e; }\u003c/code\u003e\n\n\n#### Extract\n\n\u003ca href=\"#extract\"\u003eExtract\u003c/a\u003e from T those types that are assignable to U\n\n\u003ccode\u003eT extends U ? T : never\u003c/code\u003e\n\n\n#### LoginResult\n\n\u003ccode\u003e{ provider: 'facebook'; result: \u003ca href=\"#facebookloginresponse\"\u003eFacebookLoginResponse\u003c/a\u003e; } | { provider: 'google'; result: \u003ca href=\"#googleloginresponse\"\u003eGoogleLoginResponse\u003c/a\u003e; } | { provider: 'apple'; result: \u003ca href=\"#appleproviderresponse\"\u003eAppleProviderResponse\u003c/a\u003e; } | { provider: 'twitter'; result: \u003ca href=\"#twitterloginresponse\"\u003eTwitterLoginResponse\u003c/a\u003e; } | { provider: 'oauth2'; result: \u003ca href=\"#oauth2loginresponse\"\u003eOAuth2LoginResponse\u003c/a\u003e; }\u003c/code\u003e\n\n\n#### ProviderSpecificCallResponseMap\n\n\u003ccode\u003e{ 'facebook#getProfile': \u003ca href=\"#facebookgetprofileresponse\"\u003eFacebookGetProfileResponse\u003c/a\u003e; 'facebook#requestTracking': \u003ca href=\"#facebookrequesttrackingresponse\"\u003eFacebookRequestTrackingResponse\u003c/a\u003e; }\u003c/code\u003e\n\n\n#### ProviderSpecificCall\n\n\u003ccode\u003e'facebook#getProfile' | 'facebook#requestTracking'\u003c/code\u003e\n\n\n#### ProviderSpecificCallOptionsMap\n\n\u003ccode\u003e{ 'facebook#getProfile': \u003ca href=\"#facebookgetprofileoptions\"\u003eFacebookGetProfileOptions\u003c/a\u003e; 'facebook#requestTracking': \u003ca href=\"#facebookrequesttrackingoptions\"\u003eFacebookRequestTrackingOptions\u003c/a\u003e; }\u003c/code\u003e\n\n\n#### FacebookRequestTrackingOptions\n\n\u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, never\u0026gt;\u003c/code\u003e\n\n\u003c/docgen-api\u003e\n\n\n## Privacy Manifest for App Developers\n\nIf you use Google, Facebook, or Apple login, you must declare the data collected by their SDKs in your app's `PrivacyInfo.xcprivacy` file (not in the plugin).\n\nAdd this file in your app at: `ios/App/PrivacyInfo.xcprivacy`\n\n### Google Sign-In Example\n```json\n{\n  \"NSPrivacyCollectedDataTypes\": [\n    { \"NSPrivacyCollectedDataType\": \"EmailAddress\", \"NSPrivacyCollectedDataTypeLinked\": true, \"NSPrivacyCollectedDataTypeTracking\": false },\n    { \"NSPrivacyCollectedDataType\": \"Name\", \"NSPrivacyCollectedDataTypeLinked\": true, \"NSPrivacyCollectedDataTypeTracking\": false },\n    { \"NSPrivacyCollectedDataType\": \"UserID\", \"NSPrivacyCollectedDataTypeLinked\": true, \"NSPrivacyCollectedDataTypeTracking\": false }\n  ]\n}\n```\n\n### Facebook Login Example\n```json\n{\n  \"NSPrivacyCollectedDataTypes\": [\n    { \"NSPrivacyCollectedDataType\": \"EmailAddress\", \"NSPrivacyCollectedDataTypeLinked\": true, \"NSPrivacyCollectedDataTypeTracking\": false },\n    { \"NSPrivacyCollectedDataType\": \"Name\", \"NSPrivacyCollectedDataTypeLinked\": true, \"NSPrivacyCollectedDataTypeTracking\": false },\n    { \"NSPrivacyCollectedDataType\": \"UserID\", \"NSPrivacyCollectedDataTypeLinked\": true, \"NSPrivacyCollectedDataTypeTracking\": false },\n    { \"NSPrivacyCollectedDataType\": \"FriendsList\", \"NSPrivacyCollectedDataTypeLinked\": true, \"NSPrivacyCollectedDataTypeTracking\": false }\n  ]\n}\n```\n\n### Apple Sign-In Example\n```json\n{\n  \"NSPrivacyCollectedDataTypes\": [\n    { \"NSPrivacyCollectedDataType\": \"EmailAddress\", \"NSPrivacyCollectedDataTypeLinked\": true, \"NSPrivacyCollectedDataTypeTracking\": false },\n    { \"NSPrivacyCollectedDataType\": \"Name\", \"NSPrivacyCollectedDataTypeLinked\": true, \"NSPrivacyCollectedDataTypeTracking\": false }\n  ]\n}\n```\n\n- Adjust the data types to match your app's usage and the SDK documentation.\n- See [Apple docs](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/) for all allowed keys and values.\n\n## Combine facebook and google URL handler in `AppDelegate.swift`\n\n```swift\n    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -\u003e Bool {\n        // Called when the app was launched with a url. Feel free to add additional processing here,\n        // but if you want the App API to support tracking app url opens, make sure to keep this call\n\n        // Return true if the URL was handled by either Facebook or Google authentication\n        // https://github.com/Cap-go/capacitor-social-login/blob/main/docs/setup_facebook.md#ios-setup\n        // https://github.com/Cap-go/capacitor-social-login/blob/main/docs/setup_google.md#using-google-login-on-ios\n        if FBSDKCoreKit.ApplicationDelegate.shared.application(\n            app,\n            open: url,\n            sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String,\n            annotation: options[UIApplication.OpenURLOptionsKey.annotation]\n        ) || GIDSignIn.sharedInstance.handle(url) {\n            return true\n        }\n\n        // If URL wasn't handled by auth services, pass it to Capacitor for processing\n        return ApplicationDelegateProxy.shared.application(app, open: url, options: options)\n    }\n```\n\n### Credits\n\nThis plugin implementation of google is based on [CapacitorGoogleAuth](https://github.com/CodetrixStudio/CapacitorGoogleAuth) with a lot of rework, the current maintainer is unreachable, we are thankful for his work and are now going forward on our own!\nThanks to [reslear](https://github.com/reslear) for helping to transfer users to this plugin from the old one and all the work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapacitor-social-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcap-go%2Fcapacitor-social-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapacitor-social-login/lists"}