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 support #70
Comments
Looks like it's not possible to implement OAuth without hacking on gen_smtp code near there https://github.com/Vagabond/gen_smtp/blob/8f7ba01172e679e8b4262334cefc3451b4c36777/src/gen_smtp_server_session.erl#L344-L373 But for now, you always can store your auth data, like logins/passwords in, say, database, instead of plain text in erlang code. |
I'm trying to avoid storing the real password on the server at all. So we can add a <<"XOAUTH">> here? |
Yeah, if you added XOAUTH there you could implement your oauth stuff in a custom handle_AUTH handler: https://github.com/Vagabond/gen_smtp/blob/master/src/smtp_server_example.erl#L188 You could probably also make it more pluggable, so modifying server_session was not needed for future auth types. |
👍 |
Is there a chance for oauth support when connecting to SMTP servers?
https://developers.google.com/gmail/oauth_overview
https://developers.google.com/gmail/xoauth2_protocol
2-legged auth
https://developers.google.com/gmail/oauth_protocol
Erlang oauth 2.0 client
https://github.com/kivra/oauth2_client
I currently need to save the email password in plain text in the Erlang code.
It can be much more secure if I'll be able to use an oauth token.
Thanks
The text was updated successfully, but these errors were encountered: