Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want to make on login page a URL that will redirect to http://server/resetpassword/ and there will be my cusotm page, made CustomViewServices from samples, but there is not example how to add your own page

https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/CustomViewService

Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
282 views
Welcome To Ask or Share your Answers For Others

1 Answer

It's not necessary to create a CustomViewService, you can deal with this scenario adding the following code in your AuthenticationOptions (in your startup class)

LoginPageLinks = new List<LoginPageLink>()
                {
                   new LoginPageLink()
                   {
                       Href = "resetpassword",
                       Text = "Reset Your Password",
                       Type = "resetPassword"
                   }
                }

in the logging page, there is the following code,

 <ul class="list-unstyled">
            <li ng-repeat="link in model.additionalLinks"><a ng-href="{{link.href}}">{{link.text}}</a></li>
        </ul>

More info here

So using this customisation in your AuthenticationOptions, this will add a link to your custom page.

Then you need to add a resetpassword.html page in your the template folder.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...