Aktivity „AlderCove“

private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
    context.Services.AddAuthentication(options =>
    {
        options.DefaultScheme = "Cookies";
        options.DefaultChallengeScheme = "oidc";
    })
        .AddCookie("Cookies", options =>
        {
            options.ExpireTimeSpan = TimeSpan.FromDays(365);
        })
        .AddAbpOpenIdConnect("oidc", options =>
        {
            options.Authority = configuration["AuthServer:Authority"];
            options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]); ;
            options.ResponseType = OpenIdConnectResponseType.CodeIdToken;

            options.ClientId = configuration["AuthServer:ClientId"];
            options.ClientSecret = configuration["AuthServer:ClientSecret"];

            options.SaveTokens = true;
            options.GetClaimsFromUserInfoEndpoint = true;

            options.Scope.Add("role");
            options.Scope.Add("email");
            options.Scope.Add("phone");
            options.Scope.Add("Portal");
        });
}

I am encountering the same issue running the application locally, outside of docker.

a) Navigate to url:

https://localhost:44309/Account/Login?ReturnUrl=https%3A%2F%2Flocalhost%3A44306%2Fsignin-oidc

b) Login :

c) Exception:

d) web public log file:

2022-06-07 14:37:48.835 -07:00 [INF] Error from RemoteAuthentication: OpenIdConnectAuthenticationHandler: message.State is null or empty.. 2022-06-07 14:37:48.836 -07:00 [ERR] An unhandled exception has occurred while executing the request. System.Exception: An error was encountered while handling the remote login. ---> System.Exception: OpenIdConnectAuthenticationHandler: message.State is null or empty. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<

This works - thanks!

hi

Can you direct share a template project with me? liming.ma@volosoft.com

I will check it locally.

sent shared link to your email. thx

Worked a charm!

Thanks so much.

Hi @maliming

I'd prefer not to share, are you unable to reproduce the error?

Thanks Jamie

OK. Thanks.

I assume this also applies to adding extra properties to CMS kit entities since I tried adding some to the blog post entity but it did not seem to work either?

The extra properties feature appears to be tied to the module extension system: https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities

You can then use the same extra properties system defined in the previous section to manipulate the property over the entity.

Can you recommend an approach for adding additional properties? Do I need to create a new entity with these properties, create my own service and override the UI? https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities#creating-a-new-entity-with-its-own-database-table-collection

Odpoveď

related badly formed path issue for linux I think:

https://support.abp.io/QA/Questions/2209/Bugs--Issues-v5X#answer-9ad254be-2d53-a4ca-0fe9-3a0191e0d611

related badly formed path issue for linux I think:

https://support.abp.io/QA/Questions/2209/Bugs--Issues-v5X#answer-9ad254be-2d53-a4ca-0fe9-3a0191e0d611

Odpoveď

I update the solution to use Volo.Abp.Identity.Pro.Application 5.0.1 and it now compiles, except for a missing method used by one of the tests: AbpApplicationFactory.CreateAsync

However, I experience the same issue building a docker image with this patch version as I did with version 5.1.2: https://support.abp.io/QA/Questions/2459/Docker-build-failure

Zobrazených 31 až 40 z 49 záznamov
Made with ❤️ on ABP v8.2.0-preview Updated on marca 25, 2024, 15:11