Starts in:
1 DAY
7 HRS
27 MIN
10 SEC
Starts in:
1 D
7 H
27 M
10 S

Activities of "Repunjay_TASC"

Answer

can you please share your email id, I can share one-to-one with you.

Answer

If I don't add the code below, it shows 'Connection Not Secure'., var originalOnRedirectToIdentityProvider = options.Events.OnRedirectToIdentityProvider; options.Events.OnRedirectToIdentityProvider = async context => { var redirectUri = context.ProtocolMessage.RedirectUri; Log.Information($"redirectUri 1: {context.ProtocolMessage.RedirectUri}"); context.ProtocolMessage.RedirectUri = redirectUri.Replace("http://", "https://"); Log.Information($"redirectUri 2: {context.ProtocolMessage.RedirectUri}"); if (string.IsNullOrEmpty(context.ProtocolMessage.Nonce)) { context.ProtocolMessage.Nonce = Guid.NewGuid().ToString(); } if (originalOnRedirectToIdentityProvider != null) { await originalOnRedirectToIdentityProvider(context); } };

    options.CorrelationCookie.SameSite = SameSiteMode.None; // Required for cross-site
    options.CorrelationCookie.IsEssential = true; // Always send the cookie
    options.CorrelationCookie.SecurePolicy = CookieSecurePolicy.SameAsRequest;// Use HTTPS And HTTP
    options.CorrelationCookie.HttpOnly = true; // Security measure

If I remove the above code, how should I handle the scenario? Could you please assist me?

Scenario Description :- In our environment, we have a set of microservices running within Docker containers (or Kubernetes), and these microservices communicate with each other over HTTP internally for performance and simplicity reasons. However, for external communication, specifically for handling OpenID Connect (OIDC) authentication callbacks, we need to ensure that HTTPS is used for secure communication, as these external calls require the use of HTTPS (e.g., OIDC authentication or third-party service integrations).

I have included a reference link for your consideration, as I was facing the same issue described there. https://github.com/dotnet/aspnetcore/issues/16924

Answer

facing "Correlation failed" issue after redirect URL from SSO OpenID connect.

Answer

Any update ?

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.

Issue got resolved thanks

hi

lowercase.

public class OidcAppService : ApplicationService, IOidcAppService

lowercase issue let me change and try

Thanks

Showing 111 to 120 of 191 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06