From 4bb7eba97cf66f43578c72cc56011f4b3a06a45a Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Mon, 10 Jun 2024 20:21:46 +0200 Subject: [PATCH] Added profileImageUrl to the custom login. --- Assets/Stash/Scripts/Core/StashClient.cs | 6 ++++-- Assets/Stash/Scripts/Models/CustomLoginBody.cs | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Assets/Stash/Scripts/Core/StashClient.cs b/Assets/Stash/Scripts/Core/StashClient.cs index 253e819..2313a2f 100644 --- a/Assets/Stash/Scripts/Core/StashClient.cs +++ b/Assets/Stash/Scripts/Core/StashClient.cs @@ -186,8 +186,9 @@ public static async Task LinkGooglePlayGames(string challenge, str /// Stash code challenge from the log in deeplink. /// Player identification, that will be used to identify purchases. /// Valid identification token (OICD) of the player. + /// URL to the player's profile image/avatar to be displayed during login and on web shop. /// Returns a confirmation response, or throws StashAPIRequestError if fails. - public static async Task CustomLogin(string code, string playerId, string idToken) + public static async Task CustomLogin(string code, string playerId, string idToken, string profileImageUrl) { // Create the authorization header with the access token RequestHeader authorizationHeader = new() @@ -202,7 +203,8 @@ public static async Task CustomLogin(string code, string playerId, code = code, user = new CustomLoginBody.User { - id = playerId + id = playerId, + profile_image_url = profileImageUrl } }; diff --git a/Assets/Stash/Scripts/Models/CustomLoginBody.cs b/Assets/Stash/Scripts/Models/CustomLoginBody.cs index 87d1fa9..9d9a5fc 100644 --- a/Assets/Stash/Scripts/Models/CustomLoginBody.cs +++ b/Assets/Stash/Scripts/Models/CustomLoginBody.cs @@ -12,6 +12,7 @@ public class CustomLoginBody public class User { public string id; + public string profile_image_url; } } } \ No newline at end of file