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
Add OAUTH2 support #16
base: master
Are you sure you want to change the base?
Conversation
Sorry, I'm not familiar with |
Hello! Thank you in any case. How does it work in such cases? Are there any other maintainer who could have a look? For reference, it is described in general here: https://www.rfc-editor.org/rfc/rfc1734 and here: https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth Thanks again! |
Hi @hsbt , May we kindly ask you whether there is any other contributor that could move forward on reviewing this PR? Cheers, |
`@apop` is being set to strings so this was not working: `assert_equal pop.apop?, false` since `apop?` was returning the string.
Hello @hsbt, I've added a couple of tests of the functionality and a comment explaining what the new code does. Would you be more incline to merge this if we change the code to avoid changing the public API of the library? For now we added the Thanks. |
While we are unable to support OAUTH2 with pop3 (due to upstream dependency ruby/net-pop#16), we are adding the support for mail pollers plugin. Doing so, it would be possible to write a plugin which then uses other ways (microsoft graph sdk for example) to poll emails from a mailbox. The idea is that a plugin would define a class which inherits from Email::Poller and defines a poll_mailbox static method which returns an array of strings. Then the plugin could call register_mail_poller(<class_name>) to have it registered. All the configuration (oauth2 tokens, email, etc) could be managed by sitesettings defined in the plugin.
IMO, rather than make a one-off version only for I'll try to put together a proposal in either an issue or a PR before the end of the week, after |
Any chance progress on this could me made soon? Google is pulling the plug on app-specific passwords in a few months and requiring OAuth for pop access. This means services like Discourse won't be able to check email from GSuite hosted mail servers starting in mid-June. |
Just echoing what @jbcpollak is saying above. I am an engineer at Discourse and we are tracking this in https://meta.discourse.org/t/add-richer-authentication-support-for-pop3/219340 and we definitely have a need for POP3 OAUTH2 support sooner rather than later. Is there anything that we can do to help move this forward? |
Hello, I would like to add
OAUTH2
support to this library and I started working on it.This is what I came up with right now. I'm not 100% sure about the fact that now functions accept both
isapop
andisoauth2
.So please let me know if you think this should be handled in a different way.
Thank you!