Activities of "nalle.jacobsson@helaforsakring.se"

  • ABP Framework version: v8.1.4
  • UI Type: Blazor Server
  • Database System: EF Core

I have acquired a Blazorise product token, put it in my appsettings.json and applied it like this in my BlazorModule:

     private void ConfigureBlazorise(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services
            .AddBootstrap5Providers()
            .AddFontAwesomeIcons();

        Configure< BlazoriseOptions>(options =>
        {
            options.ProductToken = configuration["BlazoriseToken"];
        });
    }

However, the "free version" message is still displayed on my site. Why?

Thanks!

Hi,

I updated to 0.6.7 and now I can't open my solution anymore:

The log says:

2024-06-12 19:43:39.906 +02:00 [ERR] Sequence contains no matching element  
System.InvalidOperationException: Sequence contains no matching element  
   at System.Linq.ThrowHelper.ThrowNoMatchException()  
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)  
   at Volo.Abp.Studio.UI.Solutions.Items.SolutionUIModel.GetAvailableModuleTemplates()  
   at Volo.Abp.Studio.UI.ViewModels.SolutionExplorer.Items.SolutionRootItemViewModel..ctor(SolutionUIModel model)  
   at Volo.Abp.Studio.UI.ViewModels.SolutionExplorer.SolutionExplorerViewModel.Y73CsTB7mq()  
   at ReactiveUI.ReactiveCommand.<>c__DisplayClass0_0.<Create>b__1(IObserver`1 observer) in /_/src/ReactiveUI/ReactiveCommand/ReactiveCommand.cs:line 90  
   at System.Reactive.Linq.QueryLanguage.CreateWithDisposableObservable`1.SubscribeCore(IObserver`1 observer)  
   at System.Reactive.ObservableBase`1.Subscribe(IObserver`1 observer)  

Hello, you can follow the steps below to solve your problem:

  1. Open the MyProjectName.abpsln file. It is usually in the same directory as the *.sln file.
  2. Open this file in an editor.
  3. Delete the suffix -pro from the template element in the third line.

For example:

Before

"template": "app-pro",

After

"template": "app",

Thank you, it works now!

One other bug I noticed is that when I ran "abp update" on my solution, it also blindly updated the Volo.Abp.Studio.Client.AspNetCore package to version 8.1.3 - a version that does not exist :) I had to manually change that to 0.6.7.

Hi,

I updated to 0.6.7 and now I can't open my solution anymore:

The log says:

2024-06-12 19:43:39.906 +02:00 [ERR] Sequence contains no matching element
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
   at Volo.Abp.Studio.UI.Solutions.Items.SolutionUIModel.GetAvailableModuleTemplates()
   at Volo.Abp.Studio.UI.ViewModels.SolutionExplorer.Items.SolutionRootItemViewModel..ctor(SolutionUIModel model)
   at Volo.Abp.Studio.UI.ViewModels.SolutionExplorer.SolutionExplorerViewModel.Y73CsTB7mq()
   at ReactiveUI.ReactiveCommand.<>c__DisplayClass0_0.<Create>b__1(IObserver`1 observer) in /_/src/ReactiveUI/ReactiveCommand/ReactiveCommand.cs:line 90
   at System.Reactive.Linq.QueryLanguage.CreateWithDisposableObservable`1.SubscribeCore(IObserver`1 observer)
   at System.Reactive.ObservableBase`1.Subscribe(IObserver`1 observer)

I found them in ExternalLoginInfo.Principal.Claims

Thanks. I hade made two mistakes:

  • I put my custom LoginModel in the wrong project, this pointed me in the right direction:

https://community.abp.io/posts/how-to-customize-the-login-page-of-an-abp-blazor-application-by4o9yms

  • I didn't decorate my custom LoginModel with the correct attributes, I found instructions here:

https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface#overriding-a-page-model-c

Now it's working 👍

My next question is how can I (in CreateExternalUserAsync()) access the claims I received via OpenIdConnect? My config looks like this:

private void ConfigureExternalProviders(ServiceConfigurationContext context, IConfiguration configuration)
{
    context.Services.AddAuthentication()
        .AddOpenIdConnect("AzureOpenId", "Azure AD OpenId", options =>
        {
            options.Authority = "https://login.microsoftonline.com/" + configuration["AzureAd:TenantId"] + "/v2.0/";
            options.ClientId = configuration["AzureAd:ClientId"];
            options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
            options.CallbackPath = configuration["AzureAd:CallbackPath"];
            options.ClientSecret = configuration["AzureAd:ClientSecret"];
            options.RequireHttpsMetadata = false;
            options.SaveTokens = true;
            options.GetClaimsFromUserInfoEndpoint = true;
            options.Scope.Add("email");
            options.Scope.Add("profile");

            options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
        })
  • ABP Framework version: v5.1.3
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

I'd like to override CreateExternalUserAsync to add some custom logic when new users are created from Azure AD. How can I accomplish this with Blazor as UI?

Showing 1 to 6 of 6 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35