Base solution for your next web application
Open Closed

google login - sourcelink #5391


User avatar
0
[email protected] created

Hi,

1) I'm having trouble setting up google authentication. I'm using Core/Angular.

Angular side shows google login and sends ExternalAuthenticate request to server but exception is thrown when requesting external user info from google API:

ore.Mvc.Internal.ControllerActionInvoker - Executing action method AkzoNobel.DigitalPlant.Web.Controllers.TokenAuthController.ExternalAuthenticate (AkzoNobel.DigitalPlant.Web.Core) with arguments (AkzoNobel.DigitalPlant.Web.Models.TokenAuth.ExternalAuthenticateModel) - Validation state: Valid
ERROR 2018-07-18 12:00:13,336 [35   ] Mvc.ExceptionHandling.AbpExceptionFilter - Response status code does not indicate success: 403 (Forbidden).
System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Abp.AspNetZeroCore.Web.Authentication.External.Google.GoogleAuthProviderApi.GetUserInfo(String accessCode)
   at AkzoNobel.DigitalPlant.Web.Controllers.TokenAuthController.GetExternalUserInfo(ExternalAuthenticateModel model) in D:\inimco\an\src\digitalplant\aspnet-core\src\AkzoNobel.DigitalPlant.Web.Core\Controllers\TokenAuthController.cs:line 371
   at AkzoNobel.DigitalPlant.Web.Controllers.TokenAuthController.ExternalAuthenticate(ExternalAuthenticateModel model) in D:\inimco\an\src\digitalplant\aspnet-core\src\AkzoNobel.DigitalPlant.Web.Core\Controllers\TokenAuthController.cs:line 253
   at lambda_method(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()

Is there anything else I need to do at Google Identity service to make this work? I read in another forum thread (#2607@fe1369ac-5c83-4c1f-96db-b41610790cd3) google+ api needs to be enabled? Is this so, and why?

2) I 've set up sourcelink as described in <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Debugging">https://aspnetboilerplate.com/Pages/Documents/Debugging</a> yet I cannot step into Abp.AspNetZeroCore.Web.dll. I can inspect the source code using ILspy though...

Why?

3) How far along is OpenId Connect social login development (for angular project)?


3 Answer(s)
  • User Avatar
    0
    [email protected] created

    Ok after enabling google+ service in google cloud the authentication succeeds. I supose asp.net zero fills in the user metadata using the google+ service. Is this correct?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @[email protected],

    1. for your last question:

    We don't directly use it but I think google sends it from Google+. So probably that is why it worked for you.

    1. Abp.AspNetZeroCore.Web.dll checks the AspNet Zero's license, because of that you can't step into it's code. You can check "DOES IT INCLUDE THE FULL SOURCE CODE?" section of <a class="postlink" href="https://aspnetzero.com/Faq">https://aspnetzero.com/Faq</a> for more info.

    2. We are hoping to complete OpenIdConnect for Angulra in v5.6, next week maybe. But we haven't worked on this yet. If we can't succeed we might move it to v5.7.

  • User Avatar
    0
    [email protected] created

    Thanks for the fast and clear response. Fingers crossed that OIDC makes it in v5.6!