update: 延迟设置 UID 和 UUID

deeplink
胡宇飞 2024-05-22 21:49:30 +08:00
parent 9d7fd12cf3
commit 3fdd02c7b6
2 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,7 @@ namespace Guru
{
public static string UID => _model?.UserId ?? IPMConfig.IPM_UID;
public static string UUID => _model?.UserId ?? IPMConfig.IPM_UUID;
public static string DeviceId => IPMConfig.IPM_DEVICE_ID ?? ""; // TODO: change it to _model member later.
public static string PushToken => IPMConfig.IPM_PUSH_TOKEN ?? ""; // TODO: change it to _model member later.
public static string AuthToken => IPMConfig.IPM_TOKEN ?? ""; // TODO: change it to _model member later.

View File

@ -184,6 +184,15 @@ namespace Guru
success = false;
}
Callbacks.SDK._onUserAuthResult?.Invoke(success);
if (success)
{
if (GuruIAP.Instance != null)
{
GuruIAP.Instance.SetUID(UID);
GuruIAP.Instance.SetUUID(UUID);
}
}
}
private void OnFirebaseAuthResult(bool success)