Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: net/smtp: add SASL XOAUTH2 authentication #64770

Closed
drakkan opened this issue Dec 16, 2023 · 3 comments
Closed

proposal: net/smtp: add SASL XOAUTH2 authentication #64770

drakkan opened this issue Dec 16, 2023 · 3 comments
Labels
Milestone

Comments

@drakkan
Copy link
Member

drakkan commented Dec 16, 2023

Proposal Details

Microsoft and Google seems to force the switch from Basic authentication to SASL XOAUTH2:

https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth
https://developers.google.com/gmail/imap/xoauth2-protocol

Implementing the protocol is quite simple, maybe we can add it to the standard library

@gopherbot gopherbot added this to the Proposal milestone Dec 16, 2023
@gopherbot
Copy link

Change https://go.dev/cl/550535 mentions this issue: net/smtp: add SASL XOAUTH2 authentication

@mateusz834
Copy link
Member

I don't want to stop this kind of change, but currently the package docs says that:

The smtp package is frozen and is not accepting new features. Some external packages provide more functionality.

Also is seems like XOAUTH2 does not have an RFC and iana considers it as obsolete for some reason: https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml

@drakkan
Copy link
Member Author

drakkan commented Dec 16, 2023

@mateusz834 Thank you. You're right, I've already added XOAUTH2 to an external package (go-mail). I didn't notice the note in the package documents. I'm sorry for the noise

@drakkan drakkan closed this as completed Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants