Skip to content

Commit

Permalink
Update to v0.1.0-rc2-hotfix1 (#54)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
GamerVII-NET authored Oct 16, 2024
1 parent bc23fb4 commit 559aad4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Gml.Client
12 changes: 6 additions & 6 deletions src/Gml.Launcher/ViewModels/SplashScreenViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ public async Task InitializeAsync()
}

var authUser = await _storageService.GetAsync<AuthUser>(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)
{
Expand Down

0 comments on commit 559aad4

Please sign in to comment.