Activities of "Repunjay_TASC"

Question
  • ABP Framework version: 7.4.2
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Subject :- SSO OIDC integration issue

  • Exception message and full stack trace: "Correlation failed"

Exception details :- In our microservices architecture, we handle internal API calls using HTTP, while external applications access our APIs over HTTPS. However, when setting up the callback URL, it automatically picks up the internal domain with HTTP, leading to issues when using HTTPS.

To address this, I added the following code to modify the redirect URI:

After implementing this change, I started facing the "Correlation failed" error in the remote authentication process. I’ve applied some additional fixes to resolve this issue.

I am currently facing an issue in my application, and I would greatly appreciate your assistance in resolving it.

ok let me try

My project is very large, and due to policy restrictions, it's not feasible to share the code. Can you suggest an alternative solution?

Hi,

you can try to create a new uow to create a user.

for example:

Guid userId; 
using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) 
{ 
    var newUserName = await GetUniqueUserNameAsync(input.Name.Trim(), input.Surname.Trim()); 
    var user = new IdentityUser(_guidGenerator.Create(), newUserName.Trim(), input.Email, tenantId); 
 
    var creationResult = await _identityUserManager.CreateAsync(user, input.Password.Trim()); 
 creationResult.CheckErrors(); 
 
    await _identityUserManager.SetEmailAsync(user, input.Email.Trim()); 
    await _identityUserManager.SetPhoneNumberAsync(user, input.PhoneNumber.Trim()); 
 
    user.Name = input.Name.Trim(); 
    user.Surname = input.Surname.Trim(); 
 
    ...... 
     
    userId = user.Id; 
    await uow.CompleteAsync(); 
} 
 
var userDetails = await _identityUserManager.GetByIdAsync(userId); 

I used above code, But still facing same issue. I've created a class file inside the shared folder and am calling this method from the app service. Since we have a requirement to make this method common, it should be accessible to everyone.

  • ABP Framework version: 7.4.2
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL.)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
public async Task<bool> CreateAsync(IdentityUserCreateDto input, Guid tenantId)
 {
 try
 {
 var newUserName = await GetUniqueUserNameAsync(input.Name.Trim(), input.Surname.Trim());
 var user = new IdentityUser(\_guidGenerator.Create(), newUserName.Trim(), input.Email, tenantId);

 var creationResult = await \_identityUserManager.CreateAsync(user, input.Password.Trim());
 creationResult.CheckErrors();

 await \_identityUserManager.SetEmailAsync(user, input.Email.Trim());
 await \_identityUserManager.SetPhoneNumberAsync(user, input.PhoneNumber.Trim());

 user.Name = input.Name.Trim();
 user.Surname = input.Surname.Trim();

 var claimsToAdd = new List\<Claim>
 {
 new Claim(ClaimTypes.Email, input.Email.Trim()),
 };
 await \_identityUserManager.AddClaimsAsync(user, claimsToAdd);
 await \_unitOfWorkManager.Current.SaveChangesAsync();

 await assignRoles(input, user);

 var userDetails = await \_identityUserManager.GetByIdAsync(user.Id);
 if (userDetails != null)
 {
 userDetails.SetProperty("Status", 1);
 userDetails.SetProperty("Language", "en");
 }
 await \_unitOfWorkManager.Current.SaveChangesAsync();
 }
 catch (Exception ex)
 {
 }
 }

<br> After successfully adding the user to the database, I encountered an error when executing the line var userDetails = await _identityUserManager.GetByIdAsync(user.Id);. I have verified that the user was added to the database and that the user ID is present and correct.

Please find the attachment for your refence :- Error :-

DB:-

Issue got resolved thanks

hi

lowercase.

public class OidcAppService : ApplicationService, IOidcAppService

lowercase issue let me change and try

  • ABP Framework version: 7.4.2
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  • I have create OIDCController, OIDCAppService and IOidcAppService while calling api endpoint facing below error.

I need your assistance.

Thanks

First move OIDCController from HttpApi.Host to Authserver

then remove CallbackPath from appsettings and the AddOpenIdConnect method.

remove Authorize from OIDCController

Use api/oidc/login method instead of authorize.

Update your logo href link to <AuthServerURL>api/oidc/login

sure can you pls share working project as well this email id nilesh.nyahal@tasconnect.com

Showing 121 to 130 of 208 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 03, 2025, 07:01