From 559aad478919e6e9bd22eae61bb36e770483b751 Mon Sep 17 00:00:00 2001 From: Anton Terentev <111225722+GamerVII-NET@users.noreply.github.com> Date: Wed, 16 Oct 2024 23:54:42 +0300 Subject: [PATCH] Update to v0.1.0-rc2-hotfix1 (#54) * Refactor authentication flow in SplashScreenViewModel Comment out direct user re-authentication process handling, and update the `IsAuth` property to validate using the existing `authUser`. This change simplifies the flow by relying on previously stored authentication information. * Update submodule link Gml.Client --- src/Gml.Client | 2 +- src/Gml.Launcher/ViewModels/SplashScreenViewModel.cs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Gml.Client b/src/Gml.Client index faec62c..3a7ca66 160000 --- a/src/Gml.Client +++ b/src/Gml.Client @@ -1 +1 @@ -Subproject commit faec62c0c40f89a4f2fe35c4b30d59f5468ef82b +Subproject commit 3a7ca66089fff1d61ec1e5296ef60c5039a9edac diff --git a/src/Gml.Launcher/ViewModels/SplashScreenViewModel.cs b/src/Gml.Launcher/ViewModels/SplashScreenViewModel.cs index f8852bc..366ce63 100644 --- a/src/Gml.Launcher/ViewModels/SplashScreenViewModel.cs +++ b/src/Gml.Launcher/ViewModels/SplashScreenViewModel.cs @@ -80,12 +80,12 @@ public async Task InitializeAsync() } var authUser = await _storageService.GetAsync(StorageConstants.User); - - var accessUser = await _manager.Auth(authUser?.AccessToken ?? string.Empty); - - await _storageService.SetAsync(StorageConstants.User, accessUser.User); - - IsAuth = accessUser.User.ExpiredDate > DateTime.Now && accessUser is { User.IsAuth: true }; + // + // var accessUser = await _manager.Auth(authUser?.AccessToken ?? string.Empty); + // + // await _storageService.SetAsync(StorageConstants.User, accessUser.User); + // + IsAuth = authUser != null && authUser.ExpiredDate > DateTime.Now && authUser is { IsAuth: true }; } catch (Exception exception) {