Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX-2357] Send engine and platform info on Passport init #86

Merged
merged 5 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading