@@ -454,7 +454,6 @@ public static void StartXboxOneSession(string xbox_user_token, Action<LootLocker
454
454
/// <summary>
455
455
/// Start a Game session for a Google User
456
456
/// The Google sign in platform must be enabled in the web console for this to work.
457
- /// A game can support multiple platforms, but it is recommended that a build only supports one platform.
458
457
/// </summary>
459
458
/// <param name="idToken">The Id Token from google sign in</param>
460
459
/// <param name="onComplete">onComplete Action for handling the response of type LootLockerSessionResponse</param>
@@ -478,6 +477,39 @@ public static void StartGoogleSession(string idToken, Action<LootLockerGoogleSes
478
477
onComplete ( response ) ;
479
478
} ) ;
480
479
}
480
+
481
+ /// <summary>
482
+ /// Start a Game session for a Google User
483
+ /// The Google sign in platform must be enabled in the web console for this to work.
484
+ /// Desired Google platform also must be configured under advanced options in the web console.
485
+ /// </summary>
486
+ /// <param name="idToken">The Id Token from google sign in</param>
487
+ /// <param name="googlePlatform">Google OAuth2 ClientID platform</param>
488
+ /// <param name="onComplete">onComplete Action for handling the response of type LootLockerSessionResponse</param>
489
+ public static void StartGoogleSession ( string idToken , GooglePlatform googlePlatform , Action < LootLockerGoogleSessionResponse > onComplete )
490
+ {
491
+ if ( ! CheckInitialized ( true ) )
492
+ {
493
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerGoogleSessionResponse > ( ) ) ;
494
+ return ;
495
+ }
496
+
497
+ CurrentPlatform . Set ( Platforms . Google ) ;
498
+
499
+ var sessionRequest = new LootLockerGoogleSignInWithPlatformSessionRequest ( idToken )
500
+ {
501
+ platform = googlePlatform . ToString ( )
502
+ } ;
503
+
504
+ LootLockerAPIManager . GoogleSession ( sessionRequest , response =>
505
+ {
506
+ if ( ! response . success )
507
+ {
508
+ CurrentPlatform . Reset ( ) ;
509
+ }
510
+ onComplete ( response ) ;
511
+ } ) ;
512
+ }
481
513
482
514
/// <summary>
483
515
/// Refresh a previous session signed in with Google.
0 commit comments