Search code examples
c#.netgoogle-oauthgmail-imapgmail-pop

NET desktop application : Using oAuth2.0 to access SMTP and IMAP services


my .NET application is a WPF desktop application responsible for sending e-mail with classic SASL mechanism and/or older one (POP-before-SMTP).

A end-user can select any SASL authentication mechanism on the GUI configuration of this application.

As a developper , I was wondering what where the gain(s) and cost of implementing the oAuth2.0 authentication mechanism availability?

What does the end-user benefit from having this authentication mechanism option available?

The end-user can provide itself with a Gmail account


Solution

  • The biggest advantage is that they don't need to create yet another account and another password they now have to remember / protect. OAuth2 is also a pretty well defined standard used by all major providers : Google, Microsoft etc.

    From a developer point of view, there are libraries which can take away the pain of coding the mechanism yourself however I do advice to at least read and understand how it works down to the finest detail.

    I have my own article on OAuth2, you're welcome to check it put and should be able to describe in detail ho to create your own implementation using standard libraries: https://eidand.com/2015/03/28/authorization-system-with-owin-web-api-json-web-tokens/