My application has implementatios of TAdvGMail and TAdvGCalendar with OAuth. But for doing the same for Microsoft services, TMS team said me I needed to move to FNC style, so I buy that package but it has no examples about how to do all what I did with TAdvGMail and TAdvGCalender, specialy how to do the authorizations (how to get the token).
Yes, I alredy see that, but I have to save the strings in my own way, like when I use TokensAsString in the VCL style. I have to save on encripted/protected databases.
The port for the callback url can change, as long as that port isn't in use and you change it to the same url in the settings of the service itself. (In this case in your Google Authentication settings.)
I am really sorry for asking againg on this thread, but I was trying to follow your documentations and your source code, and I can't figure out how to do with FNC platform this very simple authentication process I used to do with the VCL platform:
procedure TMailConf.BtnGoogleClick(Sender: TObject);
begin
GMail.App.Key := GAppkey_string;
GMail.App.Secret := GAppSecret_string;
GMail.ClearTokens;
GMail.TokensAsString := FSavedToken;
if not GMail.TestTokens then
GMail.RefreshAccess;
if not GMail.TestTokens then
GMail.DoAuth;
end;
procedure TMailConf.GMailReceivedAccessToken(Sender: TObject);
begin
FSavedToken := GMail.TokensAsString;
end;