Skip to content

Commit

Permalink
feat: Send engine and platform info on Passport init
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSchwert committed Sep 26, 2023
1 parent 4badf93 commit 76b72b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ internal class InitRequest
public string ClientId;
public string Environment;
public string? RedirectUri;
public string EngineVersion;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class PassportImpl
private DeviceConnectResponse? deviceConnectResponse;
private UniTaskCompletionSource<bool> pkceCompletionSource = new UniTaskCompletionSource<bool>();
private string? redirectUri = null;
private string unityVersion = Application.unityVersion;
private RuntimePlatform platform = Application.platform;

public PassportImpl(IBrowserCommunicationsManager communicationsManager)
{
Expand All @@ -36,7 +38,8 @@ public PassportImpl(IBrowserCommunicationsManager communicationsManager)
public async UniTask Init(string clientId, string environment, string? redirectUri = null, string? deeplink = null)
{
this.redirectUri = redirectUri;
InitRequest request = new() { ClientId = clientId, Environment = environment, RedirectUri = redirectUri };
var engineVersion = $"engine-unity-{unityVersion},platform-{platform}";
InitRequest request = new() { ClientId = clientId, Environment = environment, RedirectUri = redirectUri, EngineVersion = engineVersion };

string response = await communicationsManager.Call(
PassportFunction.INIT,
Expand Down

0 comments on commit 76b72b0

Please sign in to comment.