Page 1 of 2

Where is OAuth support?

Posted: Sat Aug 14, 2021 9:32 am
by rdonnay
Somebody told me that Xbase++ 2.0 supports OAuth protocol, but I can find nothing in the documentation.

Is this supported by Xbase++?

Re: Where is OAuth support?

Posted: Sat Aug 14, 2021 9:51 am
by Wolfgang Ciriack
Hello Roger,
look at the Assets, there is a OAuth2 client available.

Re: Where is OAuth support?

Posted: Sat Aug 14, 2021 11:31 am
by rdonnay
I just installed the most current version.
The update manager doesn't give me an option for installing assets.
How is this done?

Re: Where is OAuth support?

Posted: Sat Aug 14, 2021 10:34 pm
by Wolfgang Ciriack
In the workbench right mouse click on your target, in the context menu item "Manage Asset..".
Or you find them in your user directory ....\documents\Xbase++\.assets.

Re: Where is OAuth support?

Posted: Mon Aug 16, 2021 12:22 am
by skiman
Hi,

You can use oAuth without any problem. No need for Xbase 2.0.

I'm using it to synchronize Google calendars since 2016.

It is just posting a key to receive a token. That token must be used as authorization for all the request you need to send afterwards.

If I can help, don't hesitate to ask.

Re: Where is OAuth support?

Posted: Mon Aug 16, 2021 1:10 am
by Tom
Chris,

what you do is OAuth 1. This can be simply implemented, it's just a POST to a special server, getting the token and afterwards connecting to another server (or in some cases the same) to get the information - without login data, but with the token as the authentication. OAuth 2 is a little more complicated, since the mechanism also represents a rights structure, and the token is used to hand rights to a third party. Just look at the asset, which can be used to publish parts of the data stored on a OneDrive. It shows the difference.

Re: Where is OAuth support?

Posted: Mon Aug 16, 2021 5:56 am
by skiman
Hi TOm,

As far as I know Google is using oAuth2.0 which I use to synchronize the calendar.

See https://developers.google.com/identity/protocols/oauth2

Re: Where is OAuth support?

Posted: Mon Aug 16, 2021 6:44 am
by Tom
Hi, Chris.

Okay, seems to be #2. ;)

Anyway, on the client side, OAuth is, like you said, 1st getting a token from a server and 2nd getting data (from the same or a different server) using this token (which is alive for some seconds) as the authentication. We do this with Xb2.Net.

Re: Where is OAuth support?

Posted: Tue Aug 17, 2021 7:47 am
by rdonnay
Does this authentication need to be done every time I connect to gmail via Smtp?

I have been using Alaska's SmtpClient for years to connect to gmail for sending emails.
Bobby tells me that gmail will stop working at some time, but we don't know when that will be.

Re: Where is OAuth support?

Posted: Tue Aug 17, 2021 10:32 am
by Tom
Maybe simple SSL/TLS? And user authentication needed? All other mail providers established that during the last sixteen, twenty months, but it looks like Google walks ahead:

https://developers.google.com/gmail/api ... auth?hl=de