Book Image

ServiceStack 4 Cookbook

Book Image

ServiceStack 4 Cookbook

Overview of this book

Table of Contents (18 chapters)
ServiceStack 4 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Handling password resets for credential-based authentication


A common piece of functionality that a lot of users expect is a simple password reset, where they provide their e-mail ID, click on a link, and create a new password. In this recipe, we will go through an example of allowing users to register and log in using ServiceStack's built-in plugins and then building two services: forgot password and reset password.

Getting ready

First, we are going to need an application to integrate. We will start with a template from the ServiceStackVS Visual Studio extension. If you are using Visual Studio Express, please see the Creating your ServiceStack solution with Visual Studio and NuGet section in Appendix A, Getting Started, and continue from the second instruction in the How to do it… section.

We are also going to send e-mails that will be saved to our filesystem. By default, the example saves these emails to C:\Temp. If this is not a valid location on your system, please update this in the web...