@capgo/capacitor-social-login 8.5.12 → 8.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,29 @@
1
1
  # @capgo/capacitor-social-login
2
- <a href="https://capgo.app/"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-social-login" alt="Capgo - Instant updates for Capacitor" /></a>
2
+
3
+ Add Google, Apple, Facebook and other social sign-ins to your Capacitor app with one plugin and one API across iOS, Android and the web.
4
+
5
+ <a href="https://capgo.app/?ref=plugin_social_login"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-social-login" alt="Capgo - Instant updates for Capacitor" /></a>
3
6
 
4
7
  <div align="center">
5
- <h2><a href="https://capgo.app/?ref=plugin_social_login"> ➡️ Get Instant updates for your App with Capgo</a></h2>
6
- <h2><a href="https://capgo.app/consulting/?ref=plugin_social_login"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
8
+ <p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</p>
9
+ <h2><a href="https://capgo.app/register/?ref=plugin_social_login">➡️ Get started for free</a></h2>
10
+ <p>14-day unlimited free trial. No credit card required</p>
11
+ <p><a href="https://capgo.app/consulting/?ref=plugin_social_login">Missing a feature? We'll build the plugin for you 💪</a></p>
7
12
  </div>
8
13
 
14
+ <p align="center">
15
+ <img src="https://raw.githubusercontent.com/Cap-go/capacitor-social-login/main/assets/github-social-preview.png" alt="@capgo/capacitor-social-login for Capacitor apps" width="300" />
16
+ </p>
17
+
18
+ ## Key features
19
+
20
+ - **Many providers**: Google, Apple, Facebook, Twitter (X), LinkedIn, TikTok, Telegram and generic OAuth2.
21
+ - **One API**: `initialize()`, `login()`, `logout()`, `isLoggedIn()` and `getAuthorizationCode()`.
22
+ - **Tokens**: `refresh()`, `refreshToken()`, `decodeIdToken()` and expiry helpers.
23
+ - **Native sign-in**: Sign in with Apple, Google Sign-In and the Facebook SDK on iOS, Credential Manager on Android.
24
+ - **Web OAuth**: `handleRedirectCallback()` and `openSecureWindow()` for redirect and popup flows.
25
+ - **Platforms**: iOS, Android and Web. Check the docs for each provider's setup on each platform.
26
+
9
27
  ## Fork Information
10
28
  This 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.
11
29
 
@@ -117,7 +135,7 @@ export default config;
117
135
  - **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.
118
136
  - This configuration only affects iOS and Android platforms; it does not affect the web platform.
119
137
  - **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.
120
- - **Facebook**: When `facebook: false`, the Facebook SDK is omitted and the plugin compiles a provider stub in its own package — no `com.facebook.*` classes are shipped (avoids privacy-scanner false positives).
138
+ - **Facebook**: When `facebook: false`, the Facebook SDK is omitted and the plugin compiles a provider stub in its own package, no `com.facebook.*` classes are shipped (avoids privacy-scanner false positives).
121
139
  - **Apple (iOS)**: `apple: true` enables Sign in with Apple (AuthenticationServices). Redirect URL and backend token exchange use Foundation URLSession, so no third-party networking library is required. `apple: false` disables Apple authentication at runtime, including basic Sign in with Apple, consistent with the rule above that `false` providers are unavailable at runtime.
122
140
  - Apple Sign-In on Android uses OAuth flow without external SDK dependencies
123
141
  - Twitter uses standard OAuth 2.0 flow without external SDK dependencies
@@ -441,15 +459,15 @@ You need **two kinds** of OAuth 2.0 client IDs:
441
459
  | Client type | Used for | Where it goes |
442
460
  |-------------|----------|---------------|
443
461
  | **Web application** | Server / ID token audience | `webClientId` in `SocialLogin.initialize()` |
444
- | **Android** (one per signing key) | Proves your APK is allowed to call Google | Google Cloud Console only — **do not** pass this ID to `webClientId` |
462
+ | **Android** (one per signing key) | Proves your APK is allowed to call Google | Google Cloud Console only, **do not** pass this ID to `webClientId` |
445
463
 
446
464
  Common mistake: using the **Android** client ID as `webClientId`. Credential Manager requires the **Web** client ID there. The Android client only needs the correct **package name + SHA-1** registered in the console.
447
465
 
448
466
  Create one Android OAuth client for **each** certificate that signs builds you test:
449
467
 
450
- - **Debug** — from `./gradlew signingReport` (debug variant)
451
- - **Release** — from the APK/AAB you actually install (see below)
452
- - **Play App Signing** — from Play Console → **App integrity** → **App signing key certificate** (required for Play Store builds even if your upload key SHA-1 is already registered)
468
+ - **Debug**, from `./gradlew signingReport` (debug variant)
469
+ - **Release**, from the APK/AAB you actually install (see below)
470
+ - **Play App Signing**, from Play Console → **App integrity** → **App signing key certificate** (required for Play Store builds even if your upload key SHA-1 is already registered)
453
471
 
454
472
  The `applicationId` in `android/app/build.gradle` must match the Android OAuth client package name exactly (including any `.debug` suffix if you use one).
455
473
 
@@ -464,13 +482,13 @@ This almost always means Google rejected the combination of **installed APK sign
464
482
  1. Confirm `webClientId` is the **Web application** client ID (ends with `.apps.googleusercontent.com`).
465
483
  2. Run the app, reproduce the failure, and read Logcat (`GoogleProvider`) for `signingSha1=` and `package=`.
466
484
  3. In [Google Cloud Console → Credentials](https://console.cloud.google.com/apis/credentials), open your **Android** OAuth client and verify that **exact** package name and SHA-1 are listed.
467
- 4. If testing a **release** build, register the SHA-1 from that build — not only the debug keystore.
485
+ 4. If testing a **release** build, register the SHA-1 from that build, not only the debug keystore.
468
486
  5. If the app is distributed via **Play Store**, also register the **Play App Signing** SHA-1.
469
487
  6. Ensure Web and Android clients live in the **same** Google Cloud project.
470
488
  7. If consent screen is in Testing, confirm the Google account is a **test user**.
471
489
  8. Wait and retry after console changes.
472
490
 
473
- `USER_CANCELLED` after picking an account on a misconfigured debug build can still be a SHA-1 / client-ID mismatch — fix the console setup above first.
491
+ `USER_CANCELLED` after picking an account on a misconfigured debug build can still be a SHA-1 / client-ID mismatch, fix the console setup above first.
474
492
 
475
493
  ##### Error `[16] Account reauth failed`
476
494
 
@@ -480,14 +498,14 @@ This error comes from Google Credential Manager when re-authenticating a cached
480
498
 
481
499
  If the retry still fails for specific users, check:
482
500
 
483
- 1. **OAuth consent screen** — must be **External** (Internal / Workspace-only blocks consumer `@gmail.com` accounts).
484
- 2. **Testing mode** — every failing Google account must be listed under **Audience → Test users**.
485
- 3. **Sign in with Google setting** — the user may have disabled your app under Google Account → **Sign in with Google**.
486
- 4. **Family Link / supervised accounts** — ensure `filterByAuthorizedAccounts` is not explicitly set to `true` (the default is `false`; see [Family Link section](#google-sign-in-with-family-link-supervised-accounts) below).
487
- 5. **Play App Signing SHA-1** — still required for Play Store builds even when most users succeed (some device/account paths are stricter).
488
- 6. **Explicit override** — if your app sets `filterByAuthorizedAccounts: true`, set it back to `false` for affected users; the default already skips authorized-account filtering.
501
+ 1. **OAuth consent screen**, must be **External** (Internal / Workspace-only blocks consumer `@gmail.com` accounts).
502
+ 2. **Testing mode**, every failing Google account must be listed under **Audience → Test users**.
503
+ 3. **Sign in with Google setting**, the user may have disabled your app under Google Account → **Sign in with Google**.
504
+ 4. **Family Link / supervised accounts**, ensure `filterByAuthorizedAccounts` is not explicitly set to `true` (the default is `false`; see [Family Link section](#google-sign-in-with-family-link-supervised-accounts) below).
505
+ 5. **Play App Signing SHA-1**, still required for Play Store builds even when most users succeed (some device/account paths are stricter).
506
+ 6. **Explicit override**, if your app sets `filterByAuthorizedAccounts: true`, set it back to `false` for affected users; the default already skips authorized-account filtering.
489
507
 
490
- After a failure, filter Logcat for `GoogleProvider` — the plugin logs `package`, `signingSha1`, and `webClientId`.
508
+ After a failure, filter Logcat for `GoogleProvider`, the plugin logs `package`, `signingSha1`, and `webClientId`.
491
509
 
492
510
  ##### Extract SHA-1 from the build you install
493
511
 
@@ -860,7 +878,7 @@ Then run `npx cap sync`. The plugin uses stub classes instead of the real Facebo
860
878
 
861
879
  On Android, this error comes from **Google Credential Manager** when the installed APK's signing certificate, package name, or `webClientId` does not match Google Cloud Console.
862
880
 
863
- See [Android troubleshooting (Credential Manager, SHA-1, and Firebase)](#android-troubleshooting-credential-manager-sha-1-and-firebase) for the full checklist. After a failed login, filter Logcat for `GoogleProvider` — the plugin prints `package`, `signingSha1`, and `webClientId` to compare with your OAuth clients.
881
+ See [Android troubleshooting (Credential Manager, SHA-1, and Firebase)](#android-troubleshooting-credential-manager-sha-1-and-firebase) for the full checklist. After a failed login, filter Logcat for `GoogleProvider`, the plugin prints `package`, `signingSha1`, and `webClientId` to compare with your OAuth clients.
864
882
 
865
883
  ### Google Sign-In `[16] Account reauth failed` (Android)
866
884
 
@@ -24,7 +24,7 @@ import org.json.JSONObject;
24
24
  @CapacitorPlugin(name = "SocialLogin")
25
25
  public class SocialLoginPlugin extends Plugin {
26
26
 
27
- private final String pluginVersion = "8.5.12";
27
+ private final String pluginVersion = "8.5.13";
28
28
 
29
29
  public static String LOG_TAG = "CapgoSocialLogin";
30
30
  public HashMap<String, SocialProvider> socialProviderHashMap = new HashMap<>();
@@ -16,7 +16,7 @@ import GoogleSignIn
16
16
  */
17
17
  @objc(SocialLoginPlugin)
18
18
  public class SocialLoginPlugin: CAPPlugin, CAPBridgedPlugin {
19
- private let pluginVersion: String = "8.5.12"
19
+ private let pluginVersion: String = "8.5.13"
20
20
  public let identifier = "SocialLoginPlugin"
21
21
  public let jsName = "SocialLogin"
22
22
  private static let userCancelledCode = "USER_CANCELLED"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-social-login",
3
- "version": "8.5.12",
3
+ "version": "8.5.13",
4
4
  "description": "All social logins in one plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",