|
@@ -12,7 +12,22 @@ public class SteamIdentityProvider : IIdentityProvider
|
|
|
public IUser User { get; private set; }
|
|
|
public bool IsLoggedIn { get; private set; }
|
|
|
public Uri? EditProfileUrl { get; } = new Uri("https://store.steampowered.com/login/");
|
|
|
- public bool IsValid => true;
|
|
|
+ public bool IsValid
|
|
|
+ {
|
|
|
+ get
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ return SteamAPI.IsSteamRunning() && User != null;
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public string InvalidInfo { get; } = "STEAM_OFFLINE";
|
|
|
public event Action<string, object>? OnError;
|
|
|
public event Action<List<ProductData>>? OwnedProductsUpdated;
|
|
|
public event Action<string>? UsernameUpdated;
|