2 changed files
WPE.App.Authentication.Maui | ||
Business | ||
NativeAuthenticationStateProvider.cs | ||
WPE.App.Authentication.Maui.csproj | ||
NativeAuthenticationStateProvider.cs
/WPE.App.Authentication.Maui/Business/NativeAuthenticationStateProvider.cs-3+4/WPE.App.Authentication.Maui/Business/NativeAuthenticationStateProvider.cs
Add comment 48
Add comment 49 async Task<AuthenticationState> SignInWithSilent()
Add comment 50 {
Add comment 51 Minus if (!(await SilentSignInCore()).User?.Identity?.IsAuthenticated ?? false)
Add comment 51 Plus var state = await SilentSignInCore();
Add comment 52 Plus if (!state?.User?.Identity?.IsAuthenticated ?? false)
Add comment 52 53 {
Add comment 53 54 var user = await SignInCore(loginType, emailOrVoucherCode);
Add comment 54 55 cachedUser = user ?? NoUser;
Add comment 61 62 {
Add comment 62 63 var scope = SettingsProvider.ServerEnvironment is not AppEnvironment.Prod ? "env.test" : "env.prod";
Add comment 63 64 var authResult = await AuthClient.SignIn(loginType, scope, emailOrVoucherCode);
Add comment 64 Minus var tenant = authResult.User.FindFirst(claim => claim.Type == "tenant");
Add comment 65 Plus var tenant = authResult.User?.FindFirst(claim => claim.Type == "tenant");
Add comment 65 66
Add comment 66 Minus if (authResult.IsError || tenant is null)
Add comment 67 Plus if (authResult.IsError || authResult.User is null || tenant is null)
Add comment 67 68 return NoUser;
Add comment 68 69 else
Add comment 69 70 {
WPE.App.Authentication.Maui.csproj
/WPE.App.Authentication.Maui/WPE.App.Authentication.Maui.csproj-1+1/WPE.App.Authentication.Maui/WPE.App.Authentication.Maui.csproj
Add comment 24 <PackageIcon>icon.png</PackageIcon>
Add comment 25 <PackageReadmeFile>ReadMe.md</PackageReadmeFile>
Add comment 26 <PackageTags>WPE;Workplace Experience;infsoft</PackageTags>
Add comment 27 Minus <Version>0.3.6</Version>
Add comment 27 Plus <Version>0.3.7</Version>
Add comment 28 <GenerateDocumentationFile>true</GenerateDocumentationFile>
Add comment 29 </PropertyGroup>
Add comment 30