أنشطة "michael.sudnik"

This appears to still be an issue in v4.0.0-rc.4

If you hit F5 enough, it will go away eventually. When the first one appears, I have been disabling that type of exception until the application has started and then restore it again.

The exception does not appear to be causing any problems with actually running the application.

Hi,

When i perform the same steps as you to create a new solution (using EF), I can confirm that it works and I can logout and log back in again repeatedly without any problems.

However, when I create a new app using the MongoDB database provider, I then see the incorrect behaviour.

abp new MyApp -t app-pro -u mvc --mobile none --database-provider mongodb --csf --preview

Thanks for looking into it.

This appears to work without any problems now that I have upgraded to v4.0.0-rc3

This appears to work without any problems now that I have upgraded to v4.0.0-rc3

I have now created a brand new v4.0.0-rc3 version and made only a single modification to the code.

.AddMicrosoftAccount(MicrosoftAccountDefaults.AuthenticationScheme, "Company", options =>
                {
                    options.AuthorizationEndpoint = "https://login.microsoftonline.com/[###MY TENENT ID###]/oauth2/v2.0/authorize";
                    options.TokenEndpoint = "https://login.microsoftonline.com/[##MY TENENT ID###]/oauth2/v2.0/token";
                })

The problem occurs when running locally, without publishing to azure.

The inclusion of the following code, fixes the problem for some reason:

 [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(RegisterModel))]
    public class CustomRegisterModel : RegisterModel
    {
        protected override async Task RegisterExternalUserAsync(ExternalLoginInfo externalLoginInfo, string emailAddress)
        {
            var user = new IdentityUser(GuidGenerator.Create(), emailAddress, emailAddress, CurrentTenant.Id);

            (await UserManager.CreateAsync(user)).CheckErrors();
            (await UserManager.AddDefaultRolesAsync(user)).CheckErrors();

            var userLoginAlreadyExists = user.Logins.Any(x =>
                x.TenantId == user.TenantId &&
                x.LoginProvider == externalLoginInfo.LoginProvider &&
                x.ProviderKey == externalLoginInfo.ProviderKey);

            if (!userLoginAlreadyExists)
            {
                (await UserManager.AddLoginAsync(user, new UserLoginInfo(
                    externalLoginInfo.LoginProvider,
                    externalLoginInfo.ProviderKey,
                    externalLoginInfo.ProviderDisplayName
                ))).CheckErrors();
            }

            await SignInManager.SignInAsync(user, isPersistent: true);
        }
    }

How do I get this escalated to the support team?

I still have not figured out what is going on. I have tried implementing a custom AbpSignInManager and can see that the ExternalLoginSignInAsync method result has all properties set to false (Failed). The method is also not hitting the PreSignInCheck, which implies that it is failing in the UserManager.FindByLoginAsync(loginProvider, providerKey) method. After investigating what this does, it is suspicious that the user in the database does not have any logins associated with it. I am using MongoDB and am wondering if the logins are not being persisted to the database. Also - the IsExternal property is set to false, which does not seem right. I will keep investigating until someone else can offer any help. Thanks.

Maybe the problem is here and the AbpClaimTypes.Email is not available?

https://github.com/abpframework/abp/blob/de7d480af49b5292716a3d130c4602da202388c2/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs#L226

But, the "Register Email" page does seem to populate it ok.

إجابة

Hi, I recently did something similar and ended up referring to this example code https://github.com/EasyAbp/Abp.SettingUi

عرض 21 الي 30 من 31 إدخالات
Made with ❤️ on ABP v8.2.0-preview Updated on مارس 25, 2024, 15:11