Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reach signup page of openiddict authorization server?

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?

like image 410
Zafrul Hassan Avatar asked Apr 27 '17 08:04

Zafrul Hassan


1 Answers

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

like image 139
John Babb Avatar answered Oct 06 '22 08:10

John Babb