I'm trying to implement the "forget password" service using ASP.NET Identity. I suppose many people have implemented it before.
I'd like to know what are the advantages of using IIdentityMessageService
instead of implementing my own class for sending the emails. I feel I lose more control over the email I want to send because using that interface I get a message but it doesn't have more information as the type of email (password recovery, email confirmation, etc.)
My implementation was to generate the token and pass it to my own classes and methods without using IIdentityMessageService.
Should I use the IIdentityMessageService
interface or continue using my own class? What are the advantages of using the interface?
Thanks.
There are no "advantages" or "disadvantages". It is just an interface and you are free to implement there whatever you need to implement.
And how would
generate the token and pass it to my own classes and methods
be different from generating a token and pass it to your own class that implements IIdentityMessageService
?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.