Skip to content

Challenge vs ChallengeResult #46076

@qui8t

Description

@qui8t

My apologies in advance if this is explained before, but I could not find any topic on this Github repo, SO, or learn.microsoft.com that explains it.

I am wondering what are the differences between the following two calls when authenticating with an external identity provider, and when each is recommended over the other?

[HttpPost]
[AllowAnonymous]
public IActionResult ExternalLogin()
{
    return Challenge(_getProps(), GoogleDefaults.AuthenticationScheme);
}

[HttpPost]
[AllowAnonymous]
public IActionResult ExternalLogin()
{
    return new ChallengeResult(GoogleDefaults.AuthenticationScheme, _getProps());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Status: Resolvedold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions