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

OAuth authentication, e.g. for Google Mail #13

Open
Paebbels opened this issue Aug 30, 2016 · 7 comments
Open

OAuth authentication, e.g. for Google Mail #13

Paebbels opened this issue Aug 30, 2016 · 7 comments

Comments

@Paebbels
Copy link

Paebbels commented Aug 30, 2016

Hello,

I have a DokuWiki hostet on a free webspace in the UK and I have a Google account for emails. This secondary Google account is linked to my primary account, from which Google knows, that my phone and all my browser sessions are located in Germany. When I try to send an email via DokuWiki, Google detects a possible dangerous login and alerts my (in the browser, phone, ...). The login and send attempt from the UK is blocked and DokuWiki outputs an error if debugging is enabled.

Google supports OAuth for emails, so I could generate an authentication token for DokuWiki (additionally to the login token to reuse Google logins). Is it possible to extend this plugin to support OAuth in addition to plain authentication over TLS/SSL?

Edit:
Links for futher reading on OAuth and Google:

Kind regards
Patrick Lehmann

@splitbrain
Copy link
Owner

This would need to be implemented in https://github.com/txthinking/Mailer which I use in this plugin.

Mailer tries to be a lightweight SMTP implementation without much dependencies. Adding oAuth might add unwanted dependencies and thus might be rejected unless the implementation can be kept simple (eg. not adding a huge third party oauth library).

In any case I recommend opening a feature request at Mailer.

@Paebbels
Copy link
Author

Hello,

the linked page to Google's tools is just a demonstration, the OAuth code has circa 20 lines of PHP code.
https://github.com/google/gmail-oauth2-tools/blob/master/php/oauth2.php#L47-L70

Do you forward it or should I create a new issue on their repository?

Thanks
Patrick Lehmann

@splitbrain
Copy link
Owner

that example is for imap not SMTP. I am not saying it isn't possible to keep this simple, I am just saying it should.

please open the upstream ticket yourself.

@Paebbels
Copy link
Author

Sorry, the PHP example is just for IMAP, the Python example was shown in the docs, which tests SMTP...

OK, thanks.
I'll open an issue there.

@Paebbels
Copy link
Author

Paebbels commented Sep 9, 2016

Hello, OAuth is now implemented in txthinking/Mailer.

@splitbrain splitbrain reopened this Feb 16, 2017
@Mikhael-Danilov
Copy link

Btw, Google disabled password based auth for SMTP.

@urapadmin
Copy link

Google will retire "less secure apps" by September 30. Is there news on how to use GMail with DokuWiki after that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants