Open Closed

Facebook Login Error #3509

ribbo created

Hi, Running 4.1.4 Angular + Core and tried using Facebook login. After logging in with the popup when it returns and Angular calls ExternalAuthenticate I get an exception thrown.

It happens when LoginAsync is called function is called within ExternalAuthenticate

var loginResult = await _logInManager.LoginAsync(new UserLoginInfo(model.AuthProvider, model.ProviderKey, model.AuthProvider), GetTenancyNameOrNull());

The line before it

var externalUser = await GetExternalUserInfo(model);

seems to get an externalUser correctly, all is populated except EmailAddress (not sure if that has any impact).

The logs show

INFO  2017-07-07 17:29:09,423 [22   ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method LightboxLogic.StravaGO.Web.Controllers.TokenAuthController.ExternalAuthenticate (LightboxLogic.StravaGO.Web.Core) with arguments (LightboxLogic.StravaGO.Web.Models.TokenAuth.ExternalAuthenticateModel) - ModelState is Valid
ERROR 2017-07-07 17:29:19,079 [23   ] Mvc.ExceptionHandling.AbpExceptionFilter - Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Abp.Authorization.Users.AbpUser`1.SetNormalizedNames()
   at LightboxLogic.StravaGO.Authorization.Users.UserRegistrationManager.<RegisterAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at LightboxLogic.StravaGO.Web.Controllers.TokenAuthController.<RegisterExternalUserAsync>d__25.MoveNext()

Thanks, Matt

1 Answer(s)
  • 0
    ismcagdas created
    Support Team


    Yes, it is probably about email address because EmailAddress field is required. The exception occurs here <a class="postlink" href=""> ... ser.cs#L51</a>.

    It might be related to your facebook app's settings, can you check that ?