laminas-mail icon indicating copy to clipboard operation
laminas-mail copied to clipboard

Add OAuth support

Open griesi007 opened this issue 2 years ago • 10 comments

Microsoft Office365 / Exchange Online will finally turn off current BasicAuth standard authentication for POP3 on 2022/10/01. From then on only XOAUTH2 is supported for POP3. Also Microsoft is already switching "Basic Auth" off for certain exchange online instances.

It would be great if Laminas Mail could support POP with XOAUTH2

griesi007 avatar Jul 22 '22 14:07 griesi007

Send a patch 👍

Ocramius avatar Jul 22 '22 14:07 Ocramius

@Ocramius yes that´s what I am currently planning.

griesi007 avatar Jul 22 '22 14:07 griesi007

@Ocramius Just provided a pull request.

griesi007 avatar Jul 28 '22 09:07 griesi007

Keeping this open until feature actually landed

Ocramius avatar Jul 28 '22 09:07 Ocramius

Closing as Won't fix as per https://github.com/laminas/laminas-mail/pull/199#discussion_r932123007

Ocramius avatar Jul 28 '22 11:07 Ocramius

#199 has been correctly rejected as contributor is not going to fulfil this library requirements, but OAuth support needs to land here eventually, both in IMAP/POP and SMTP protocols

OAuth2 has no specific binding to Microsoft, it's just the first major email provider to ban other auth mechanisms: https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-may-2022/ba-p/3301866

I say let's reopen this issue and wait for a proper implementation

Slamdunk avatar Jul 28 '22 12:07 Slamdunk

Works for me :+1:

Ocramius avatar Jul 28 '22 12:07 Ocramius

@Slamdunk Your comment "OAuth2 has no specific binding to Microsoft" is not completely true. The POP3 XOAUTH procedure is done differently by Micrsoft than by Google. With Microsoft it is a 2 step process requiring first a "AUTH XOAUTH2" request beeing sent and afterwards a separate request providing the XOAUT2 string. Google does that in one request

https://docs.microsoft.com/de-de/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth

griesi007 avatar Jul 28 '22 12:07 griesi007

I have no idea how to implement this but I will need OAuth SMTP Support für Laminas\Mail some day. So I just subscribed to see how its going.

RalfEggert avatar Nov 30 '22 11:11 RalfEggert

#227 Resolves Oauth for SMTP

EmeryEx avatar Jan 12 '23 04:01 EmeryEx