diff --git a/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts index b30b1e742ba..d6385e3af78 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts @@ -62,8 +62,8 @@ export function registerLocale(locale: string, injector: Injector): Promise return new Promise((resolve, reject) => { return import( /* webpackChunkName: "_locale-[request]"*/ - /* webpackInclude: /\/(ar|cs|en|fr|pt|tr|ru|sl|zh-Hans|zh-Hant).js/ */ - /* webpackExclude: /\/global|\/extra/ */ + /* webpackInclude: /[/\\](ar|cs|en|fr|pt|tr|ru|hu|sl|zh-Hans|zh-Hant).js/ */ + /* webpackExclude: /[/\\]global|extra/ */ `@angular/common/locales/${cultureNameLocaleFileMap[locale] || locale}.js` ) .then(module => { @@ -101,7 +101,9 @@ async function defaultLocalErrorHandlerFn({ } if (isDevMode) { - console.error(`Cannot find the ${locale} locale file. You can check how can add new culture at https://docs.abp.io/en/abp/latest/UI/Angular/Localization#adding-new-culture`); + console.error( + `Cannot find the ${locale} locale file. You can check how can add new culture at https://docs.abp.io/en/abp/latest/UI/Angular/Localization#adding-new-culture`, + ); } resolve(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs index 7554ae8acad..8097475d640 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs @@ -3,6 +3,7 @@ using Blazorise; using Blazorise.Bootstrap; using Blazorise.Icons.FontAwesome; +using IdentityModel; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -71,7 +72,11 @@ private static void ConfigureAuthentication(WebAssemblyHostBuilder builder) builder.Services.AddOidcAuthentication(options => { builder.Configuration.Bind("AuthServer", options.ProviderOptions); + options.UserOptions.RoleClaim = JwtClaimTypes.Role; options.ProviderOptions.DefaultScopes.Add("MyProjectName"); + options.ProviderOptions.DefaultScopes.Add("role"); + options.ProviderOptions.DefaultScopes.Add("email"); + options.ProviderOptions.DefaultScopes.Add("phone"); }); }