1

Identity Server v3 Custom Page Reset Password

I am doing the very same thing except I am working from the Mvc View Service example. I cannot figure out how I need to modify the MvcViewService and LogonWorkflowController to add the reset password page / view.

Any assist is greatly appreciated.

jrbedard
  • 3,662
  • 5
  • 30
  • 34

1 Answers1

0

In MvcViewService class you have to change implementation of public Task<Stream> Login(LoginViewModel model, SignInMessage message) method.

Below code example adds two custom links to Login page:

  • Reset password
  • Register

public Task<Stream> Login(LoginViewModel model, SignInMessage message)
{
    model.AdditionalLinks = new List<LoginPageLink>()
    {
        new LoginPageLink()
        {
            Text = "Reset password",
            Href = "resetpassword"
        },
        new LoginPageLink()
        {
            Text = "Register",
            Href = "register"
        }
    };

    return this.GenerateStream(
        model, 
        message, 
        "login", 
        () => this.defaultViewService.Login(model, message));
}

This is how it looks: Login page result with two additional links at the bottom