From the course: ASP.NET MVC 5 Identity: Authentication and Authorization

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Email confirmation in action

Email confirmation in action

From the course: ASP.NET MVC 5 Identity: Authentication and Authorization

Start my 1-month free trial

Email confirmation in action

- [Instructor] Now that we configured the SendGrid API, let us go to our Account Controller. Inside the Account Controller, search for the register action. This is the action which is used to handle the register request from the user. We see that in line 158, after the user has been created, we automatically sign in the user. So let us comment out this line of code. Next, let us just uncomment all these three lines of code. So here we create the code and then we create a call back URL which is going to be used from the user to confirm their email address. Instead of redirecting the users to the home page, let us send them to an info view. So for that we write return view info. Since the view is missing, let us create the view by right clicking on the view and then Add View. We change the name to info and then add. Here we simply write, "Please confirm your email address." We save the changes and we go back to our Account Controller. So far we have made sure that an email is sent to…

Contents