Closed cromerc closed 2 years ago
Why not just use Google oauth2 for login?
I do use google oauth2 for login, that is unrelated to this problem. This is about the emails sent by the gitea service through google smtp server, not about login.
Oh, ok, sorry, misunderstood issue
Our built in mail library may not support oauth2, however with @zeripath's mail refactoring we may be able to add another type of mail provider using https://godoc.org/google.golang.org/api/gmail/v1 (see https://github.com/go-gitea/gitea/blob/master/custom/conf/app.ini.sample#L631 for more details about alternative mail providers).
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Not stale we need this
[x]
):Description
I use gsuite from google to send emails from my gitea server. This is done through what google calls an SMTP relay. However a problem will be coming up in the future to continue using it since they will start blocking access using only username and password, they will require the use of oauth2.
Right now my config for email looks like this: ENABLED = true MAILER_TYPE = smtp HOST = smtp-relay.gmail.com:465 FROM = gitea@mydomain.com USER = myusername@mydomain.com PASSWD = mypassword HELO_HOSTNAME = mydomain.com IS_TLS_ENABLED = true
This is what I received in an email from google:
So in June nobody will be able to use gmail server with gitea except for those people that were already using it before that date. Then in February of 2021 it will stop working for everyone including myself.
I don't know why, but it already effected me now, for some reason LSA was disabled automatically on my account and all emails from gitea were failing to be sent. I re-enabled LSA for now, but that is only a temporary solution.
To get around this problem oauth2 support will have to be added. I don't know if this is the right page, but here is some info on oauth2 with smtp from google: https://developers.google.com/gmail/imap/xoauth2-protocol