Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several small issues across Boilerplate (#9083) #9084

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
//#if (api == "Integrated")
"ServerAddress": "/",
"ServerAddress": "http://localhost:5030/",
//#endif
//#if (IsInsideProjectTemplate)
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<BitText>App Name: <b>@appName</b></BitText>
<BitText>App Version: <b>@appVersion</b></BitText>
<BitText>OS: <b>@os</b></BitText>
<BitText>Web View: <b>@webView</b></BitText>
<BitText>OEM: <b>@oem</b></BitText>
<BitText>Environment: <b>@AppEnvironment.Current</b></BitText>
<BitText>Process Id: <b>@processId</b></BitText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public partial class AboutPage
private string appVersion = default!;
private string processId = default!;
private string os = default!;
private string webView = default!;
private string oem = default!;

protected async override Task OnInitAsync()
Expand All @@ -23,7 +24,8 @@ protected async override Task OnInitAsync()
// https://stackoverflow.com/a/2941199/2720104
appName = AppInfo.Name;
appVersion = telemetryContext.AppVersion!;
os = $"{telemetryContext.OS} {telemetryContext.WebView}";
os = telemetryContext.OS!;
webView = telemetryContext.WebView!;
processId = Environment.ProcessId.ToString();
oem = DeviceInfo.Current.Manufacturer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static void ConfigureServices(this MauiAppBuilder builder)
//#if (appCenter == true)
if (Microsoft.AppCenter.AppCenter.Configured)
{
builder.Logging.AddAppCenter(options => { });
builder.Logging.AddAppCenter(options => options.IncludeScopes = true);
msynk marked this conversation as resolved.
Show resolved Hide resolved
}
//#endif

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{
"Logging": {
//#if (appCenter == true)
"AppCenterLoggerProvider": {
"LogLevel": {
"Default": "Information"
}
}
//#endif
},
"$schema": "https://json.schemastore.org/appsettings.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<BitText>App Name: <b>@appName</b></BitText>
<BitText>App Version: <b>@appVersion</b></BitText>
<BitText>OS: <b>@os</b></BitText>
<BitText>Web View: <b>@webView</b></BitText>
<BitText>Environment: <b>@AppEnvironment.Current</b></BitText>
<BitText>Process Id: <b>@processId</b></BitText>
</BitStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public partial class AboutPage
private string appName = default!;
private string appVersion = default!;
private string os = default!;
private string webView = default!;
private string processId = default!;


Expand All @@ -21,7 +22,8 @@ protected override async Task OnInitAsync()
var asm = typeof(AboutPage).Assembly;
appName = asm.GetCustomAttribute<AssemblyTitleAttribute>()!.Title;
appVersion = telemetryContext.AppVersion!;
os = $"{telemetryContext.OS} {telemetryContext.WebView}";
os = telemetryContext.OS!;
webView = telemetryContext.WebView!;
processId = Environment.ProcessId.ToString();

await base.OnInitAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static void AddClientWindowsProjectServices(this IServiceCollection servi
//#if (appCenter == true)
if (Microsoft.AppCenter.AppCenter.Configured)
{
loggingBuilder.AddAppCenter(options => { });
loggingBuilder.AddAppCenter(options => options.IncludeScopes = true);
msynk marked this conversation as resolved.
Show resolved Hide resolved
}
//#endif
//#if (appInsights == true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ public async Task<TwoFactorAuthResponseDto> TwoFactorAuth(TwoFactorAuthRequestDt
var unformattedKey = await userManager.GetAuthenticatorKeyAsync(user);
if (string.IsNullOrEmpty(unformattedKey))
{
await userManager.ResetAuthenticatorKeyAsync(user);
IUserAuthenticatorKeyStore<User> userAuthenticatorKeyStore = (IUserAuthenticatorKeyStore<User>)userStore;
await userAuthenticatorKeyStore.SetAuthenticatorKeyAsync(user,
userManager.GenerateNewAuthenticatorKey(), cancellationToken);
await userStore.UpdateAsync(user, cancellationToken);
msynk marked this conversation as resolved.
Show resolved Hide resolved
unformattedKey = await userManager.GetAuthenticatorKeyAsync(user);

if (string.IsNullOrEmpty(unformattedKey))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
"LogLevel": {
"Default": "Information"
},
//#if (appCenter == true)
"AppCenterLoggerProvider": {
"LogLevel": {
"Default": "Information"
}
},
//#endif
//#if (appInsights == true)
"ApplicationInsights": {
"LogLevel": {
Expand Down
Loading