How to reach signup page of openiddict authorization server?
Asked Answered
F

1

11

I have built opeiddict as separate web application as authorization server. I am stuck with small problem, that is how I can go to user registration page directly though a link from the client web application. Right now I can go to login page, as your sample example:

public ActionResult SignIn() {
           // Instruct the OIDC client middleware to redirect the user agent to the identity provider.
           // Note: the authenticationType parameter must match the value configured in Startup.cs
           return new ChallengeResult(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties {
               RedirectUri = "/"
           });
       }

Is there a way to go to authentication server Account/Register from client app?

Ferrotype answered 27/4, 2017 at 8:52 Comment(2)
Syed, Zafrul, please let me know if you need anything more in the way of a response/answer.Outlive
Please mark the answer as the correct answer.Outlive
O
4

It looks like you can set the url in the redirect. See the following snippet:

[AllowAnonymous]
public IActionResult SignIn()
{
    return new ChallengeResult(
        OpenIdConnectDefaults.AuthenticationScheme,
        new AuthenticationProperties
        {
            IsPersistent = true,
            RedirectUri = Url.Action("SignInCallback", "Account")
        });
}

See the docs here: Initiating the authentication flow

Outlive answered 18/9, 2017 at 19:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.