brockallen / BrockAllen.MembershipReboot

MembershipReboot is a user identity management and authentication library.
Other
742 stars 238 forks source link

Password reset email - How do I specify return URL? #625

Closed jonbarthol closed 8 years ago

jonbarthol commented 8 years ago

Using MembershipReboot, I was able to get a password reset email sent with a link to reset my password. What I'm trying to figure out is how do I include a returnUrl parameter in the link? Without a returnUrl, a user that successfully resets his password will be "stuck" in IdentityServer. One idea is to store a "VerificationReturnUrl" on the UserAccounts table. Not sure if this is a bad idea. Thanks.

jonbarthol commented 8 years ago

I realized I wasn't very clear in my initial post. It's easy to append any returnUrl to the link in the password reset email. But what I need to append is the URL that the user came from initially when attempting to login. This returnUrl is in IdSrv's signin message. But I don't think I can use the GetSignInMessage method from the EmailMessageFormatter.GetBody method which I'm overriding.

jonbarthol commented 8 years ago

I decided to use a new VerificationReturnUrl column on the UserAccounts table. Thanks.