Activities of "Fabio.Zinesi"

Answer

Hi Maliming, we have solved. Thank you for your reply.

Question
  • ABP Framework version: v7.3.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

How can I override the error message box?

I need to show the error inside a <div> instead of the modal message.

How can I do it?

Question
  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hi, I need to manage 2 different database (all the 2 database is sql server). How can i do it?

There is also an example to use ABP with tables based on multiple columns as key?

Bye.

Fabio.

Hi Anialy,

thank you very much for your support.

Unfortunaly, for this project I have to use Microsoft.Identity.Web and Microsoft.Graph.

Witch is the best way to add this authentication metod?

Best Regards.

Fabio.

In witch file i have to add the code?


using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using Owl.reCAPTCHA; using System.Linq; using System.Threading.Tasks; using Volo.Abp.Account.ExternalProviders; using Volo.Abp.Account.Public.Web; using Volo.Abp.Account.Public.Web.Pages.Account; using Volo.Abp.Account.Security.Recaptcha; using Volo.Abp.DependencyInjection; using Volo.Abp.Security.Claims;

namespace Acme.Penstore.Pages.Account { [ExposeServices(typeof(LoginModel))] [Dependency(ReplaceServices = true)] public class AppLoginModel : LoginModel { public AppLoginModel(IAuthenticationSchemeProvider schemeProvider, IOptions accountOptions, IAbpRecaptchaValidatorFactory recaptchaValidatorFactory, IAccountExternalProviderAppService accountExternalProviderAppService, ICurrentPrincipalAccessor currentPrincipalAccessor, IOptions identityOptions, IOptionsSnapshot reCaptchaOptions) : base(schemeProvider, accountOptions, recaptchaValidatorFactory, accountExternalProviderAppService, currentPrincipalAccessor, identityOptions, reCaptchaOptions) { }

    public override async Task OnGetExternalLoginCallbackAsync(string returnUrl = "", string returnUrlHash = "", string remoteError = null)
    {
        var token = await SignInManager.GetExternalLoginInfoAsync();
        var accessToken = token?.AuthenticationTokens?.FirstOrDefault(x => x.Name == "access_token");

        return await base.OnGetExternalLoginCallbackAsync(returnUrl, returnUrlHash, remoteError);
    }
}

}

If i do this:

private void ConfigureExternalProviders(ServiceConfigurationContext context)
{
    var configuration = context.Services.GetConfiguration();

    context.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
            .AddMicrosoftIdentityWebApp(configuration.GetSection("AzureAd"));
    context.Services.AddMicrosoftIdentityWebApiAuthentication(configuration, "AzureAd");


    context.Services.AddControllersWithViews();

    context.Services.AddAuthentication()

        
        .AddJwtBearer("Default", options =>
        {
            options.Authority = configuration["AuthServer:Authority"];
            options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
            options.Audience = "DruidAI";
            options.Configuration = new OpenIdConnectConfiguration();
        })

.....

It works but do not login in ABP.

  • ABP Framework version: v7.3.0
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • **Tiered (for MVC)
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am tring to add

 private void ConfigureExternalProviders(ServiceConfigurationContext context)
{
        context.Services.AddAuthentication()
            .AddMicrosoftIdentityWebApi( ..... )

but i cannot find the parameters for function. What are the right parameters?

After the login i have to make this kind of call:

var accessToken = await m_tokenAcquisition.GetAccessTokenForUserAsync(Configuration["AzureAd:Scopes:0"].Split(" "));

// Get username of logged in user
var userInfo = await m_graphServiceClient.Me.Request().GetAsync();
var userName = userInfo.DisplayName;

AuthDetails authDetails = new AuthDetails
{
    UserName = userName,
    AccessToken = accessToken
};

How can i do this?

Best Regards.

It works. Thank you very much

Thank You. I'll check it as soon as possible

Hi,

it's possible to have the source code example of the demo https://x.leptontheme.com for Anguar UI?

Best Regards

Fabio Z.

Showing 31 to 40 of 40 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13