git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 1/3] send-email: implement SMTP bearer authentication

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 23, 2025, 18:04 UTC
Message-ID
<xmqqjz7azrdk.fsf@gitster.g>
In-Reply-To
<PN3PR01MB9597776CB37BE7B05A7ADD80B8BA2@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
Aditya Garg <gargaditya08@live.com> writes:
Show 9 quoted lines
> From: Julian Swagemakers <julian@swagemakers.org>
>
> Manually send SMTP AUTH command for auth type OAUTHBEARER and XOAUTH2.
> This is necessary since they are currently not supported by the Perls
> Authen::SASL module.
>
> The bearer token needs to be passed in as the password. This can be done
> with git-credential-oauth[0] after minor modifications[1]. Which will
> allow using git send-email with Gmail and oauth2 authentication:

I am not familiar with this area, especially with Authen::SASL, so I'd appreciate a second eye from other reviewers.

Having said that, the documentation is very clearly written, so is the above log message.

Please fold overly long lines the patch adds. We officially aim for 80-column soft limit, and we allow going over it when folding lines to stay under it makes the result less readable. But lines added to the credential callback to call smtp_bearer_auth() are a way too wide, for example [*].

Footnote [*] The text themselves are not overly wide, but the long lines there are primarily due to them deeply indented. I have to wonder if it is a sign that the part of the code needs to be a bit better refactored, e.g., by defining the callback sub defined elsewhere and passed to Git::credential() call as a variable that holds a reference to it, instead of defining an anonymous sub in place there, for example.

Previous: Aditya GargNext: Aditya Garg
Message 3 of 63 in “send-email: add oauth2 support and fix outlook breaking threads”
  1. 0/3 send-email: add oauth2 support and fix outlook breaking threadsAditya Garg, Apr 23, 2025
  2. 1/3 send-email: implement SMTP bearer authenticationAditya Garg, Apr 23, 2025
  3. Junio C HamanoApr 23, 2025
  4. Aditya GargApr 23, 2025
  5. Greg Kroah-HartmanApr 24, 2025
  6. Aditya GargApr 24, 2025
  7. 2/3 send-email: retrieve Message-ID from outlook SMTP serverAditya Garg, Apr 23, 2025
  8. Junio C HamanoApr 23, 2025
  9. brian m. carlsonApr 23, 2025
  10. Aditya GargApr 24, 2025
  11. 3/3 send-email: add option to generate passswords like OAuth2 tokensAditya Garg, Apr 23, 2025
  12. Junio C HamanoApr 23, 2025
  13. Aditya GargApr 24, 2025
  14. Junio C HamanoApr 24, 2025
  15. M HickfordApr 23, 2025
  16. Aditya GargApr 24, 2025
  17. 0/3 send-email: add oauth2 support and fix outlook breaking threadsAditya Garg, Apr 24, 2025
  18. 1/3 send-email: implement SMTP bearer authenticationAditya Garg, Apr 24, 2025
  19. Julian SwagemakersApr 24, 2025
  20. 2/3 send-email: retrieve Message-ID from outlook SMTP serverAditya Garg, Apr 24, 2025
  21. Greg Kroah-HartmanApr 24, 2025
  22. Yao ZiApr 26, 2025
  23. Aditya GargApr 27, 2025
  24. Yao ZiApr 28, 2025
  25. Aditya GargApr 27, 2025
  26. 3/3 send-email: add option to generate passswords like OAuth2 tokensAditya Garg, Apr 24, 2025
  27. Julian SwagemakersApr 24, 2025
  28. Aditya GargApr 24, 2025
  29. Junio C HamanoApr 24, 2025
  30. Aditya GargApr 24, 2025
  31. Junio C HamanoApr 24, 2025
  32. 0/1 send-email: add oauth2 support and fix outlook breaking threadsAditya Garg, Apr 25, 2025
  33. 1/1 send-email: retrieve Message-ID from outlook SMTP serverAditya Garg, Apr 25, 2025
  34. Aditya GargApr 25, 2025
  35. Erik HuelsmannApr 25, 2025
  36. Junio C HamanoApr 25, 2025
  37. Erik HuelsmannApr 25, 2025
  38. Aditya GargApr 25, 2025
  39. Junio C HamanoApr 25, 2025
  40. Aditya GargApr 25, 2025
  41. Aditya GargApr 26, 2025
  42. Eric SunshineApr 26, 2025
  43. Aditya GargApr 26, 2025
  44. Junio C HamanoApr 28, 2025
  45. send-email: add --smtp-outlook-id-tweak optionAditya Garg, Apr 28, 2025
  46. send-email: add --smtp-outlook-id-tweak optionAditya Garg, Apr 28, 2025
  47. Junio C HamanoApr 28, 2025
  48. Aditya GargApr 29, 2025
  49. send-email: add --[no-]outlook-id-fix optionAditya Garg, Apr 29, 2025
  50. Aditya GargApr 29, 2025
  51. Junio C HamanoApr 29, 2025
  52. Junio C HamanoApr 29, 2025
  53. Aditya GargApr 29, 2025
  54. send-email: add --[no-]outlook-id-fix optionAditya Garg, Apr 29, 2025
  55. Junio C HamanoApr 29, 2025
  56. Aditya GargApr 30, 2025
  57. Aditya GargApr 24, 2025
  58. Erik HuelsmannApr 24, 2025
  59. Julian SwagemakersApr 25, 2025
  60. Aditya GargApr 25, 2025
  61. Aditya GargApr 25, 2025
  62. Erik HulsmannApr 25, 2025
  63. Aditya GargApr 24, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.