Sorry for the inconvenience I will check and get back to you asap
Hello iteabr2020,
Have you checked this https://stackoverflow.com/questions/73553149/why-preflight-requests-fail-only-in-chrome-and-then-they-work-after-few-tries please try to find out issue on chrome by following this.
I think your application is working on another browsers so it might not be issue related to performance, It should be browser related issue and need to find that issue.
Thanks, Anjali
Hello sandeep.step2gen@gmail.com,
I am trying to reproduce the issue at my end but I am unable to do so.
Could you please try to restore packages once for contracts solution and clean and rebuild the solution.
Please let me know if it helps you
Thanks, Anjali
Hello iteabr2020,
Could you please try below steps
Clear Browser Cache: Clear the browser cache in both Chrome and Edge. Sometimes, an outdated or corrupted cache can lead to performance issues.
Incognito Mode: Test your Angular application in incognito or private browsing mode. This ensures that no browser extensions or cached data are affecting the performance.
Also have look to this link https://sandeep.dev/various-ways-to-speed-up-your-cors-preflight-requests if it founds helpful for you
Regards, Anjali
Hello Navneet@aol.com.au
Please try to add /account
in your client uri of OpenIddictApplications
table for angular and MVC project.
With the above update in table I was able to redirect to landing page of angular project as pre-authenticated
Please do let me know if it helps you.
Thank You Anjali
Hi
you can use azure ad token in angular by storing it in the cookie. see the implementation and steps you have to do in this ticket. https://support.abp.io/QA/Questions/5720/PowerBI-Embed-access-token-issue-with-ABP#answer-3a0d816c-f911-fb7f-703b-e50b0c54a4be
Also in azure ad please specify AuthServer url as Redirect URL not the angular one.
please override OnGetExternalLoginCallbackAsync
the login.cshtml.cs
and write below code, and the when you are back from login inside angular app just get the token for cookie
using Jupiter.Web;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Options;
using Owl.reCAPTCHA;
using System;
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 Jupiter.Web.Pages.Account
{
[ExposeServices(typeof(LoginModel))]
[Dependency(ReplaceServices = true)]
public class AppLoginModel : LoginModel
{
private readonly IConfiguration _configuration;
public AppLoginModel(IAuthenticationSchemeProvider schemeProvider, IOptions< AbpAccountOptions > accountOptions, IAbpRecaptchaValidatorFactory recaptchaValidatorFactory, IAccountExternalProviderAppService accountExternalProviderAppService, ICurrentPrincipalAccessor currentPrincipalAccessor, IOptions< IdentityOptions > identityOptions, IOptionsSnapshot< reCAPTCHAOptions > reCaptchaOptions, IConfiguration configuration) : base(schemeProvider, accountOptions, recaptchaValidatorFactory, accountExternalProviderAppService, currentPrincipalAccessor, identityOptions, reCaptchaOptions)
{
_configuration = configuration;
}
public override async Task< IActionResult > OnGetExternalLoginCallbackAsync(string returnUrl = "", string returnUrlHash = "", string remoteError = null)
{
var token = await SignInManager.GetExternalLoginInfoAsync();
var accessToken = token?.AuthenticationTokens?.FirstOrDefault(x => x.Name == "access_token");
var powerbi = new PowerBiServiceApi(_configuration, accessToken?.Value ?? string.Empty);
HttpContext.Response.Cookies.Append("AuthToken", accessToken?.Value ?? string.Empty);
var report = await powerbi.GetReport(Guid.Parse("workspaceid"), Guid.Parse("reportid"));
return await base.OnGetExternalLoginCallbackAsync(returnUrl, returnUrlHash, remoteError);
}
}
}
Hi
please check this guide to generate two endpoints in a swagger https://github.com/domaindrivendev/Swashbuckle.AspNetCore#generate-multiple-swagger-documents
you can then add [ApiExplorerSettings(GroupName = "v2")]
in each controller of your api.
let me know if you face any issue
Hello SamirBoutazzout,
I am not able to reproduce the issue is it possible to share a sample solution with this issue to support@abp.io with ticket id.
regards, Anjali
Hello theChrisMarsh,
for your error - Loading PostCSS Plugin failed: Cannot find module 'autoprefixer' you may refer this link https://github.com/webpack-contrib/postcss-loader/issues/187
And as you are trying to modify the Theme and Layout for Angular please have look to this video link from 21.00 minutes onward https://www.youtube.com/watch?v=R9CqTtn6Wcg
I hope this will clear all your queries.
regards, Anjali