@capgo/capacitor-social-login 0.0.85 → 0.0.87-alpha.0

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
@@ -70,6 +70,8 @@ const res = await SocialLogin.login({
70
70
 
71
71
  ## Facebook
72
72
 
73
+ Docs: [How to setup facebook login](./docs/setup_facebook.md)
74
+
73
75
  ### Android configuration
74
76
 
75
77
  More information can be found here: https://developers.facebook.com/docs/android/getting-started
@@ -343,11 +345,11 @@ Refresh the access token
343
345
 
344
346
  #### InitializeOptions
345
347
 
346
- | Prop | Type |
347
- | -------------- | ---------------------------------------------------------------------------------------- |
348
- | **`facebook`** | <code>{ appId: string; clientToken: string; }</code> |
349
- | **`google`** | <code>{ iOSClientId?: string; iOSServerClientId?: string; webClientId?: string; }</code> |
350
- | **`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> |
351
353
 
352
354
 
353
355
  #### FacebookLoginResponse
@@ -374,13 +376,22 @@ Refresh the access token
374
376
  | **`userId`** | <code>string</code> |
375
377
 
376
378
 
377
- #### GoogleLoginResponse
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
378
390
 
379
- | Prop | Type |
380
- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
381
- | **`accessToken`** | <code><a href="#accesstoken">AccessToken</a> \| null</code> |
382
- | **`idToken`** | <code>string \| null</code> |
383
- | **`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> |
384
395
 
385
396
 
386
397
  #### AppleProviderResponse
@@ -403,11 +414,11 @@ Refresh the access token
403
414
 
404
415
  #### GoogleLoginOptions
405
416
 
406
- | Prop | Type | Description | Default | Since |
407
- | ------------------------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------ |
408
- | **`scopes`** | <code>string[]</code> | Specifies the scopes required for accessing Google APIs The default is defined in the configuration. | | |
409
- | **`nonce`** | <code>string</code> | Nonce | | |
410
- | **`grantOfflineAccess`** | <code>boolean</code> | Set if your application needs to refresh access tokens when the user is not present at the browser. it will add offline_access to the scopes In response use `serverAuthCode` key | <code>false</code> | 0.0.69 |
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> |
411
422
 
412
423
 
413
424
  #### AppleProviderOptions
@@ -428,9 +439,10 @@ Refresh the access token
428
439
 
429
440
  #### AuthorizationCode
430
441
 
431
- | Prop | Type | Description |
432
- | --------- | ------------------- | ----------- |
433
- | **`jwt`** | <code>string</code> | Jwt |
442
+ | Prop | Type | Description |
443
+ | ----------------- | ------------------- | ------------ |
444
+ | **`jwt`** | <code>string</code> | Jwt |
445
+ | **`accessToken`** | <code>string</code> | Access Token |
434
446
 
435
447
 
436
448
  #### AuthorizationCodeOptions
@@ -448,6 +460,11 @@ Refresh the access token
448
460
  <code>{ facebook: <a href="#facebookloginresponse">FacebookLoginResponse</a>; google: <a href="#googleloginresponse">GoogleLoginResponse</a>; apple: <a href="#appleproviderresponse">AppleProviderResponse</a>; }</code>
449
461
 
450
462
 
463
+ #### GoogleLoginResponse
464
+
465
+ <code><a href="#googleloginresponseonline">GoogleLoginResponseOnline</a> | <a href="#googleloginresponseoffline">GoogleLoginResponseOffline</a></code>
466
+
467
+
451
468
  #### LoginOptions
452
469
 
453
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>
@@ -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
  }