Skip to content

Commit

Permalink
Added profileImageUrl to the custom login.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliexe committed Jun 10, 2024
1 parent a3724d3 commit 4bb7eba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Assets/Stash/Scripts/Core/StashClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ public static async Task<LinkResponse> LinkGooglePlayGames(string challenge, str
/// <param name="code">Stash code challenge from the log in deeplink.</param>
/// <param name="playerId">Player identification, that will be used to identify purchases.</param>
/// <param name="idToken">Valid identification token (OICD) of the player.</param>
/// <param name="profileImageUrl">URL to the player's profile image/avatar to be displayed during login and on web shop.</param>
/// <returns>Returns a confirmation response, or throws StashAPIRequestError if fails.</returns>
public static async Task<LinkResponse> CustomLogin(string code, string playerId, string idToken)
public static async Task<LinkResponse> CustomLogin(string code, string playerId, string idToken, string profileImageUrl)
{
// Create the authorization header with the access token
RequestHeader authorizationHeader = new()
Expand All @@ -202,7 +203,8 @@ public static async Task<LinkResponse> CustomLogin(string code, string playerId,
code = code,
user = new CustomLoginBody.User
{
id = playerId
id = playerId,
profile_image_url = profileImageUrl
}
};

Expand Down
1 change: 1 addition & 0 deletions Assets/Stash/Scripts/Models/CustomLoginBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class CustomLoginBody
public class User
{
public string id;
public string profile_image_url;
}
}
}

0 comments on commit 4bb7eba

Please sign in to comment.