@capgo/capacitor-social-login 0.0.76 → 0.0.77-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
@@ -341,11 +341,11 @@ Refresh the access token
341
341
 
342
342
  #### InitializeOptions
343
343
 
344
- | Prop | Type |
345
- | -------------- | ---------------------------------------------------------------------------------------- |
346
- | **`facebook`** | <code>{ appId: string; clientToken: string; }</code> |
347
- | **`google`** | <code>{ iOSClientId?: string; iOSServerClientId?: string; webClientId?: string; }</code> |
348
- | **`apple`** | <code>{ clientId?: string; redirectUrl?: string; }</code> |
344
+ | Prop | Type |
345
+ | -------------- | ---------------------------------------------------------------------------------------------------------------------- |
346
+ | **`facebook`** | <code>{ appId: string; clientToken: string; }</code> |
347
+ | **`google`** | <code>{ iOSClientId?: string; iOSServerClientId?: string; webClientId?: string; mode?: 'online' \| 'offline'; }</code> |
348
+ | **`apple`** | <code>{ clientId?: string; redirectUrl?: string; }</code> |
349
349
 
350
350
 
351
351
  #### FacebookLoginResponse
@@ -372,13 +372,22 @@ Refresh the access token
372
372
  | **`userId`** | <code>string</code> |
373
373
 
374
374
 
375
- #### GoogleLoginResponse
375
+ #### GoogleLoginResponseOnline
376
+
377
+ | Prop | Type |
378
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
379
+ | **`accessToken`** | <code><a href="#accesstoken">AccessToken</a> \| null</code> |
380
+ | **`idToken`** | <code>string \| null</code> |
381
+ | **`profile`** | <code>{ email: string \| null; familyName: string \| null; givenName: string \| null; id: string \| null; name: string \| null; imageUrl: string \| null; }</code> |
382
+ | **`responseType`** | <code>'online'</code> |
383
+
384
+
385
+ #### GoogleLoginResponseOffline
376
386
 
377
- | Prop | Type |
378
- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
379
- | **`accessToken`** | <code><a href="#accesstoken">AccessToken</a> \| null</code> |
380
- | **`idToken`** | <code>string \| null</code> |
381
- | **`profile`** | <code>{ email: string \| null; familyName: string \| null; givenName: string \| null; id: string \| null; name: string \| null; imageUrl: string \| null; }</code> |
387
+ | Prop | Type |
388
+ | -------------------- | ---------------------- |
389
+ | **`serverAuthCode`** | <code>string</code> |
390
+ | **`responseType`** | <code>'offline'</code> |
382
391
 
383
392
 
384
393
  #### AppleProviderResponse
@@ -401,11 +410,11 @@ Refresh the access token
401
410
 
402
411
  #### GoogleLoginOptions
403
412
 
404
- | Prop | Type | Description | Default | Since |
405
- | ------------------------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------ |
406
- | **`scopes`** | <code>string[]</code> | Specifies the scopes required for accessing Google APIs The default is defined in the configuration. | | |
407
- | **`nonce`** | <code>string</code> | Nonce | | |
408
- | **`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 |
413
+ | Prop | Type | Description | Default |
414
+ | ----------------------- | --------------------- | ---------------------------------------------------------------------------------------------------- | ------------------ |
415
+ | **`scopes`** | <code>string[]</code> | Specifies the scopes required for accessing Google APIs The default is defined in the configuration. | |
416
+ | **`nonce`** | <code>string</code> | Nonce | |
417
+ | **`forceRefreshToken`** | <code>boolean</code> | Force refresh token (only for Android) | <code>false</code> |
409
418
 
410
419
 
411
420
  #### AppleProviderOptions
@@ -426,9 +435,10 @@ Refresh the access token
426
435
 
427
436
  #### AuthorizationCode
428
437
 
429
- | Prop | Type | Description |
430
- | --------- | ------------------- | ----------- |
431
- | **`jwt`** | <code>string</code> | Jwt |
438
+ | Prop | Type | Description |
439
+ | ----------------- | ------------------- | ------------ |
440
+ | **`jwt`** | <code>string</code> | Jwt |
441
+ | **`accessToken`** | <code>string</code> | Access Token |
432
442
 
433
443
 
434
444
  #### AuthorizationCodeOptions
@@ -446,6 +456,11 @@ Refresh the access token
446
456
  <code>{ facebook: <a href="#facebookloginresponse">FacebookLoginResponse</a>; google: <a href="#googleloginresponse">GoogleLoginResponse</a>; apple: <a href="#appleproviderresponse">AppleProviderResponse</a>; }</code>
447
457
 
448
458
 
459
+ #### GoogleLoginResponse
460
+
461
+ <code><a href="#googleloginresponseonline">GoogleLoginResponseOnline</a> | <a href="#googleloginresponseoffline">GoogleLoginResponseOffline</a></code>
462
+
463
+
449
464
  #### LoginOptions
450
465
 
451
466
  <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
  }
@@ -189,16 +189,15 @@ public class AppleProvider implements SocialProvider {
189
189
  }
190
190
  }
191
191
 
192
- this.appleAuthURLFull =
193
- AUTHURL +
194
- "?client_id=" +
195
- this.clientId +
196
- "&redirect_uri=" +
197
- this.redirectUrl +
198
- "&response_type=code&scope=" +
199
- scopes +
200
- "&response_mode=form_post&state=" +
201
- state;
192
+ this.appleAuthURLFull = AUTHURL +
193
+ "?client_id=" +
194
+ this.clientId +
195
+ "&redirect_uri=" +
196
+ this.redirectUrl +
197
+ "&response_type=code&scope=" +
198
+ scopes +
199
+ "&response_mode=form_post&state=" +
200
+ state;
202
201
 
203
202
  if (nonce != null) {
204
203
  this.appleAuthURLFull += "&nonce=" + nonce;