Support generic OAuth for non-HTTP hosts#1956
Open
pl4nty wants to merge 1 commit intogit-ecosystem:mainfrom
Open
Support generic OAuth for non-HTTP hosts#1956pl4nty wants to merge 1 commit intogit-ecosystem:mainfrom
pl4nty wants to merge 1 commit intogit-ecosystem:mainfrom
Conversation
Non-HTTP hosts can support OAuth using absolute authorize/token endpoints, like Outlook.com SMTP. Example: ``` [sendemail] smtpServer = smtp-mail.outlook.com smtpUser = [email protected] smtpEncryption = tls smtpServerPort = 587 smtpAuth = XOAUTH2 [credential "smtp://smtp-mail.outlook.com:587"] oauthClientId = a95fbac5-cbbb-4032-b10d-fb756c457ba1 oauthAuthorizeEndpoint = https://login.microsoftonline.com/common/oauth2/v2.0/authorize oauthTokenEndpoint = https://login.microsoftonline.com/common/oauth2/v2.0/token oauthScopes = offline_access https://outlook.office.com/SMTP.Send ```
pl4nty
commented
Jun 14, 2025
| Uri uri = input.GetRemoteUri(); | ||
|
|
||
| // Determine the if the host supports Windows Integration Authentication (WIA) or OAuth | ||
| if (!StringComparer.OrdinalIgnoreCase.Equals(uri.Scheme, "http") && |
Author
There was a problem hiding this comment.
Naive approach of just removing the guard, but we could check each endpoint instead (including DeviceCode if present?). They should be relative with HTTP(S) host, or absolute HTTP(S)
Author
|
This might need a docs update too. I'd like to include I also had to test this change on an alternate account. My [email protected] Outlook.com SMTP is broken on multiple clients, probably due to the grandfathered custom domain. Outlook support weren't helpful unfortunately. |
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Non-HTTP hosts can support OAuth using absolute
authorizeandtokenendpoints, like EXO/Outlook.com SMTP. Example: