{"id":28700004,"url":"https://github.com/Cap-go/capacitor-social-login","last_synced_at":"2025-06-14T11:03:49.023Z","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-06-12T09:22:54.000Z","size":33600,"stargazers_count":98,"open_issues_count":28,"forks_count":27,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-12T10:30:38.677Z","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,"zenodo":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-06-12T09:18:50.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":172,"template":false,"template_full_name":null,"purl":"pkg:github/Cap-go/capacitor-social-login","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","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-social-login/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259799166,"owners_count":22912971,"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":"2025-06-14T11:01:32.762Z","updated_at":"2025-06-14T11:03:49.008Z","avatar_url":"https://github.com/Cap-go.png","language":"Java","funding_links":["https://github.com/sponsors/Cap-go","https://opencollective.com/capgo"],"categories":["[Capgo plugins](https://capgo.app/)","Capgo Capacitor Plugins"],"sub_categories":["Authentication \u0026 Security"],"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\"\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\"\u003e Fix your annoying bug now, Hire a Capacitor expert 💪\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 implement social auth for:\n- Google (with credential manager)\n- Apple (with 0auth on android)\n- Facebook ( with latest SDK)\n\nWe plan in the future to keep adding others social login and make this plugin the all in one solution.\n\nThis plugin is the only one who implement all 3 majors social login on WEB, IOS and Android\n\n## Documentation\n\nBest experience to read the doc here:\n\nhttps://capgo.app/docs/plugins/social-login/getting-started/\n\n\n## Install\n\n```bash\nnpm install @capgo/capacitor-social-login\nnpx cap sync\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](./docs/setup_facebook.md)\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### Android configuration\n\nThe implemention 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\nDirectly call the `initialize` method with the `google` provider\n\n```typescript\nawait SocialLogin.initialize({\n  google: {\n    webClientId: 'your-client-id', // 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-client-id', // the iOS client id\n    iOSServerClientId: 'your-server-client-id', // the iOS server client id (required in mode offline)\n  },\n});\nconst res = await SocialLogin.login({\n  provider: 'google',\n  options: {\n    scopes: ['email', 'profile'],\n  },\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## 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* [`providerSpecificCall(...)`](#providerspecificcall)\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\"\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;\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'; }) =\u003e Promise\u003cvoid\u003e\n```\n\nLogout\n\n| Param         | Type                                                          |\n| ------------- | ------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ provider: 'apple' \\| 'google' \\| 'facebook'; }\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 access token\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### providerSpecificCall(...)\n\n```typescript\nproviderSpecificCall\u003cT extends \"facebook#getProfile\"\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### Interfaces\n\n\n#### InitializeOptions\n\n| Prop           | Type                                                                                                                                                                |\n| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`facebook`** | \u003ccode\u003e{ appId: string; clientToken?: 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; }\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| **`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                                                                                                         |\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{ user: string; email: string \\| null; givenName: string \\| null; familyName: string \\| null; }\u003c/code\u003e |\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                 |\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\n\n#### AppleProviderOptions\n\n| Prop         | Type                  | Description |\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\n\n#### isLoggedInOptions\n\n| Prop           | Type                                           | Description |\n| -------------- | ---------------------------------------------- | ----------- |\n| **`provider`** | \u003ccode\u003e'apple' \\| 'google' \\| 'facebook'\u003c/code\u003e | Provider    |\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'\u003c/code\u003e | Provider    |\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#### FacebookGetProfileOptions\n\n| Prop         | Type                  | Description                              |\n| ------------ | --------------------- | ---------------------------------------- |\n| **`fields`** | \u003ccode\u003estring[]\u003c/code\u003e | Fields to retrieve from Facebook profile |\n\n\n### Type Aliases\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; }\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; }\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#### ProviderSpecificCallResponseMap\n\n\u003ccode\u003e{ 'facebook#getProfile': \u003ca href=\"#facebookgetprofileresponse\"\u003eFacebookGetProfileResponse\u003c/a\u003e; }\u003c/code\u003e\n\n\n#### ProviderSpecificCall\n\n\u003ccode\u003e'facebook#getProfile'\u003c/code\u003e\n\n\n#### ProviderSpecificCallOptionsMap\n\n\u003ccode\u003e{ 'facebook#getProfile': \u003ca href=\"#facebookgetprofileoptions\"\u003eFacebookGetProfileOptions\u003c/a\u003e; }\u003c/code\u003e\n\n\u003c/docgen-api\u003e\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 tranfer users to this plugin from the old one and all the work.\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## Troubleshooting\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","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"}