I’m trying to send emails through an endpoint, but I understand that basic SMTP authentication (username/password) is being deprecated by many email providers such as Gmail and Microsoft. OAuth 2.0 is now the recommended approach.
I have the following questions:
How can I implement email sending using OAuth 2.0 in C#? Are there any recommended libraries or best practices?
In the client project, who is responsible for providing the client ID and client secret required for OAuth 2.0? Are these credentials provided by the client, or do we need to generate them by registering an application on our side.
Does the refresh token expire after a certain period of time?