@capgo/capacitor-social-login 0.0.86 → 0.0.87
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 +34 -19
- package/android/build.gradle +1 -0
- package/android/src/main/java/ee/forgr/capacitor/social/login/GoogleProvider.java +639 -68
- package/android/src/main/java/ee/forgr/capacitor/social/login/ModifiedMainActivityForSocialLoginPlugin.java +5 -0
- package/android/src/main/java/ee/forgr/capacitor/social/login/SocialLoginPlugin.java +33 -1
- package/dist/docs.json +71 -10
- package/dist/esm/definitions.d.ts +24 -8
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +8 -1
- package/dist/esm/web.js +247 -45
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +247 -45
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +247 -45
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/SocialLoginPlugin/GoogleProvider.swift +71 -13
- package/ios/Sources/SocialLoginPlugin/SocialLoginPlugin.swift +30 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -345,11 +345,11 @@ Refresh the access token
|
|
|
345
345
|
|
|
346
346
|
#### InitializeOptions
|
|
347
347
|
|
|
348
|
-
| Prop | Type
|
|
349
|
-
| -------------- |
|
|
350
|
-
| **`facebook`** | <code>{ appId: string; clientToken: string; }</code>
|
|
351
|
-
| **`google`** | <code>{ iOSClientId?: string; iOSServerClientId?: string; webClientId?: string; }</code> |
|
|
352
|
-
| **`apple`** | <code>{ clientId?: string; redirectUrl?: string; }</code>
|
|
348
|
+
| Prop | Type |
|
|
349
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
350
|
+
| **`facebook`** | <code>{ appId: string; clientToken: string; }</code> |
|
|
351
|
+
| **`google`** | <code>{ iOSClientId?: string; iOSServerClientId?: string; webClientId?: string; mode?: 'online' \| 'offline'; }</code> |
|
|
352
|
+
| **`apple`** | <code>{ clientId?: string; redirectUrl?: string; }</code> |
|
|
353
353
|
|
|
354
354
|
|
|
355
355
|
#### FacebookLoginResponse
|
|
@@ -376,13 +376,22 @@ Refresh the access token
|
|
|
376
376
|
| **`userId`** | <code>string</code> |
|
|
377
377
|
|
|
378
378
|
|
|
379
|
-
####
|
|
379
|
+
#### GoogleLoginResponseOnline
|
|
380
|
+
|
|
381
|
+
| Prop | Type |
|
|
382
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
383
|
+
| **`accessToken`** | <code><a href="#accesstoken">AccessToken</a> \| null</code> |
|
|
384
|
+
| **`idToken`** | <code>string \| null</code> |
|
|
385
|
+
| **`profile`** | <code>{ email: string \| null; familyName: string \| null; givenName: string \| null; id: string \| null; name: string \| null; imageUrl: string \| null; }</code> |
|
|
386
|
+
| **`responseType`** | <code>'online'</code> |
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
#### GoogleLoginResponseOffline
|
|
380
390
|
|
|
381
|
-
| Prop
|
|
382
|
-
|
|
|
383
|
-
| **`
|
|
384
|
-
| **`
|
|
385
|
-
| **`profile`** | <code>{ email: string \| null; familyName: string \| null; givenName: string \| null; id: string \| null; name: string \| null; imageUrl: string \| null; }</code> |
|
|
391
|
+
| Prop | Type |
|
|
392
|
+
| -------------------- | ---------------------- |
|
|
393
|
+
| **`serverAuthCode`** | <code>string</code> |
|
|
394
|
+
| **`responseType`** | <code>'offline'</code> |
|
|
386
395
|
|
|
387
396
|
|
|
388
397
|
#### AppleProviderResponse
|
|
@@ -405,11 +414,11 @@ Refresh the access token
|
|
|
405
414
|
|
|
406
415
|
#### GoogleLoginOptions
|
|
407
416
|
|
|
408
|
-
| Prop
|
|
409
|
-
|
|
|
410
|
-
| **`scopes`**
|
|
411
|
-
| **`nonce`**
|
|
412
|
-
| **`
|
|
417
|
+
| Prop | Type | Description | Default |
|
|
418
|
+
| ----------------------- | --------------------- | ---------------------------------------------------------------------------------------------------- | ------------------ |
|
|
419
|
+
| **`scopes`** | <code>string[]</code> | Specifies the scopes required for accessing Google APIs The default is defined in the configuration. | |
|
|
420
|
+
| **`nonce`** | <code>string</code> | Nonce | |
|
|
421
|
+
| **`forceRefreshToken`** | <code>boolean</code> | Force refresh token (only for Android) | <code>false</code> |
|
|
413
422
|
|
|
414
423
|
|
|
415
424
|
#### AppleProviderOptions
|
|
@@ -430,9 +439,10 @@ Refresh the access token
|
|
|
430
439
|
|
|
431
440
|
#### AuthorizationCode
|
|
432
441
|
|
|
433
|
-
| Prop
|
|
434
|
-
|
|
|
435
|
-
| **`jwt`**
|
|
442
|
+
| Prop | Type | Description |
|
|
443
|
+
| ----------------- | ------------------- | ------------ |
|
|
444
|
+
| **`jwt`** | <code>string</code> | Jwt |
|
|
445
|
+
| **`accessToken`** | <code>string</code> | Access Token |
|
|
436
446
|
|
|
437
447
|
|
|
438
448
|
#### AuthorizationCodeOptions
|
|
@@ -450,6 +460,11 @@ Refresh the access token
|
|
|
450
460
|
<code>{ facebook: <a href="#facebookloginresponse">FacebookLoginResponse</a>; google: <a href="#googleloginresponse">GoogleLoginResponse</a>; apple: <a href="#appleproviderresponse">AppleProviderResponse</a>; }</code>
|
|
451
461
|
|
|
452
462
|
|
|
463
|
+
#### GoogleLoginResponse
|
|
464
|
+
|
|
465
|
+
<code><a href="#googleloginresponseonline">GoogleLoginResponseOnline</a> | <a href="#googleloginresponseoffline">GoogleLoginResponseOffline</a></code>
|
|
466
|
+
|
|
467
|
+
|
|
453
468
|
#### LoginOptions
|
|
454
469
|
|
|
455
470
|
<code>{ provider: "facebook"; options: <a href="#facebookloginoptions">FacebookLoginOptions</a>; } | { provider: "google"; options: <a href="#googleloginoptions">GoogleLoginOptions</a>; } | { provider: "apple"; options: <a href="#appleprovideroptions">AppleProviderOptions</a>; }</code>
|
package/android/build.gradle
CHANGED
|
@@ -63,4 +63,5 @@ dependencies {
|
|
|
63
63
|
testImplementation "junit:junit:$junitVersion"
|
|
64
64
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
65
65
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
66
|
+
implementation 'androidx.concurrent:concurrent-futures:1.2.0'
|
|
66
67
|
}
|