Aditya Garg <gargaditya08@xxxxxxxx> writes: >> Something like: >> >> [credential "smtp://smtp.office365.com:587"] >> username = someone@xxxxxxxxxxx >> helper = "!f() { test \"$1\" = get && echo \"password=$(cd /workspaces/codespaces-blank/M365-IMAP && python3 ./refresh_token.py)\"; }; f" > > Interesting, and this works too!. I wasn't aware of this. > > Junio, I can drop the third patch if you want. What I want does not matter in this case, no? ;-) It does look like an additional mechanism only for this use case is unneeded, but it would be nice to address a related but different problem, which is What made you write the extra mechanism in the first place? In other words, was the current documentation insufficient for you to realize that credential helper is an existing good solution for your problem and there was no need to add a new mechanism? If so, there will be numerous next "you" who will also want to use OAuth2 token from a program output and get frustrated because they cannot find how to do so in our documentation, no? Would a new paragraph with an example like Julian gave above be something we want to add, or do we already have enough information there and the only thing users need to do is to look a bit more carefully? Thanks.