Activities of "isaac.yip@cpy.com.hk"

Blazor server

  • ABP Framework version: v5.3.0
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I am running microservice on docker with a bridge network. Using HttpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString(), and it return the bridge gateway.

How to get the correct client ip address?

In the OnGetExternalLoginCallbackAsync function (login.html.cs), I found that calling signin two times there if the the signin result is not success but without signout. May I know the reason?

var result = await SignInManager.ExternalLoginSignInAsync(
            loginInfo.LoginProvider,
            loginInfo.ProviderKey,
            isPersistent: true,
            bypassTwoFactor: true
        );

        if (!result.Succeeded)
        {
            await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext
            {
                Identity = IdentitySecurityLogIdentityConsts.IdentityExternal,
                Action = "Login" + result
            });
        }

After added login info or created external user, it call signin method again.

var externalUser = await UserManager.FindByEmailAsync(email);
        if (externalUser == null)
        {
            externalUser = await CreateExternalUserAsync(loginInfo);
        }
        else
        {
            if (await UserManager.FindByLoginAsync(loginInfo.LoginProvider, loginInfo.ProviderKey) == null)
            {
                CheckIdentityErrors(await UserManager.AddLoginAsync(externalUser, loginInfo));
            }
        }

        if (await HasRequiredIdentitySettings())
        {
            Logger.LogWarning($"New external user is created but confirmation is required!");

            await StoreConfirmUser(externalUser);
            return RedirectToPage("./ConfirmUser", new {
                returnUrl = ReturnUrl,
                returnUrlHash = ReturnUrlHash
            });
        }

        await SignInManager.SignInAsync(externalUser, false);

For the First login, I found that the result from ExternalLoginSignInAsync is not success. Can I add the signout there? Will it cause any problems?

if (!result.Succeeded)
        {
            await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext
            {
                Identity = IdentitySecurityLogIdentityConsts.IdentityExternal,
                Action = "Login" + result
            });
            await SignInManager.SignOutAsync();
        }

deployed

Already increased the request size. Still not work.

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.2.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • ERR_HTTP2_PROTOCOL_ERROR / Bad Request - Request Too Long
  • Steps to reproduce the issue:"
    1. Create a new abp user using IdentityUserManager.CreateAsync() method
    2. login as external login using Azure OpenIDConnect
    3. If Microsoft already logined, it will show the Bad Request - Request Too Long Error.
    4. If not and follow the Microsoft login steps, it will show ERR_HTTP2_PROTOCOL_ERROR Error.
    5. For every new created user, it show up the same problem. I need to clear the cookies and login again.

If login success, the cookies will be like that.

If the problem show up, cookies will be

If you want keep producing the issue, you can delete the record in AbpUserLogins table and login again.

It only occur when running on IIS. If using dotnet run in localhost, no such issue occur.

Thanks. It works now.

Checked. No record in the Redis.

It works now. Thank you.

Can you call the sample endpoint on gateway from the URL: https://localhost:44325/api/notification-service/sample ?

Can

If so, try adding the [Route] attribute to GetAsync method in SampleController:

Added. And throw the same exception.

Showing 1 to 10 of 18 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11