Skip to content

LinkedIn Authentication Failed: An error occurred while retrieving the user profile #300

@luniv04

Description

@luniv04

I am trying to use this article ASP.NET Core 2.0: Authentication Using LinkedIn and follow it step by step to try an authenticate using LinkedIn. There are a few differences that I would like to point out. I am using Visual Studio 2019. I am using ASP.NET Core 2.2. I am also using and not .

When I run the application, everything seems to work pretty good at first. I click on the LinkedIn button and I am transferred to LinkedIn. I enter my credentials and submit them. A redirect is performed to my locally hosted application. But then something goes wrong. The application just doesn't quite accept the response.

Within the method OnRemoteFailure = loginFailureHandler => {...} my breakpoint is getting hit. There is some problem authenticating. When I look into the context of loginFailureHandler.Failure I can see the following error message {"An error occurred while retrieving the user profile."}.

I did see this similar issue, but my situation seems to be a little different. I did try looking at the response from LinkedIn with Fiddler and there was nothing useful. I am not sure if there are any other logs that I can get into to see useful information.

Any ideas would be greatly appreciated. Running through the article literally takes just 5 minutes but it doesn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions