SMTP worker, Gmail, and oAuth
Joe Maus
jmaus at theccgllc.com
Thu Aug 22 20:28:59 UTC 2024
Hi Paul (and everyone else),
Still getting Login Denied error when using oAuth with or without the user name and password. I'm getting nowhere with the SMTP object and oauth using the sample library from HUB. Like I said before, the http worker is functional as a POST to the appropriate endpoint (although it seems to crash Omnis more than I would like when sending the payload). For that I'm basically creating an email from scratch and then causing it to be converted to base64 suitable for web transport and then posting it as content-type/rfc822. From the logs generated by the SMTP object in the sample lib it appears the OAUTH accepted by Goggle, but I could be reading the log incorrectly.
Scope wise, I'm using "....googleapis.com/auth/gmail.send" for my oAuth worker scope as this is a "sensitive" scope as opposed to a "restricted" scope, which I think ".compose" is.
While on the subject of Google Gmail - how dose one handle the Google verification process? All of the documentation I've seen appears to assume the applicant is providing some kind of web based app, I've not really seen anything specific for a desktop app going through verification. I note they look for ownership of a domain and the web page should link to a privacy and user details type pages to indicate what is being used from Google. Seems I should have that in a window in the application. Any guidance anyone can provide about the Google verification process would be helpful.
Kind regards,
Joe Maus
> On Aug 20, 2024, at 4:52 AM, Paul Mulroney <pmulroney at logicaldevelopments.com.au> wrote:
>
> Hi Joe,
>
> The OAUTH scope we use on our Google project is ".../auth/gmail.compose". For the $scope property of the OAUTH2 Worker, we use "https://mail.google.com/".
>
> Hope this helps!
>
> Regards,
> Paul.
>
>
>> On 20 Aug 2024, at 4:29 am, Joe Maus <jmaus at theccgllc.com> wrote:
>>
>> Hi,
>>
>> So, when I use the SMTP worker and oAuth and I try to send an email to my other account from my gmail account, I get a login denied error from the gMail SMTP server. I wonder if my scope is wrong, I am using the scope from my HTML post worker which connects and sends email just fine. But I thought I'd try to migrate to the SMTP object for things like mail shot and the like. Anyway, the scope I'm using is:
>>
>> /www.googleapis.com/auth/gmail.send <https://www.googleapis.com/auth/gmail.send>
>>
>> And I can't really find any on-point documentation on what the scope ought to be when using the SMTP server approach over the HTML post path, but it seems like it should work. I think I have the oAuth configured correctly as the token is present in the object as expected and it has a valid expiry date, and as mentioned, it's working OK from the HTTP object.
>>
>> The on-line documentation implies that user name and password might be required, but I would think using oAuth would supersede the need for user name and password. That and Goggle is going to not allow user name and password access to their services next month, so oAuth is the only way forward.
>>
>> Any thoughts appreciated...
>>
>> Kind regards,
>>
>> Joe Maus
>>
>> _____________________________________________________________
>> Manage your list subscriptions at https://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>
>
> Television may insult your intelligence, but nothing rubs it in like a computer.
> --
> Paul W. Mulroney We Don't Do Simple Pty Ltd
> pmulroney at logicaldevelopments.com.au Trading as Logical Developments
> www.logicaldevelopments.com.au ACN 161 009 374
> Ph: +61 8 9458 3889 86 Coolgardie Street
> BENTLEY WA 6102
>
>
>
>
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list