Problems Session Open Google Drive - VCL

The Cloud is leaving an open browser session when the client logs off it requests a new authentication in the application. How not afford it? 

I'm using Google Drive, Cloud VCL component

Hi,


I'm not sure I understand your question correctly. Do you want to logout the logged-in user from google through the API?
Unfortunately this is currently not supported in TAdvGDrive.
However, this is a good suggestion and we'll investigate if this functionality can be added in a future version of the TMS Cloud Pack.

I will not friend, try to explain better, I'm using Google translate, When we open a browser the email I used to log into Google Drive is connected, if the user logs off my system stops working and asks the login screen again and authorization when I try to send a file to the cloud. I would use my system with my account on my clients, without them having access to it, I believe it is problem session in browsers. Any suggestions on how to solve?

Please note that authentication tokens are not stored in browser sessions.
Have you tried using the SaveTokens and LoadTokens calls to save/load authentication tokens locally?


For an example, please have a look at the CloudStorageDemo application (included with the TMS Cloud Pack download).

I'm using, I copied the DEMO and work on it from time to time he calls once the password for authentication, do not know what can be ocorrento for him "lose" authentication and need to authenticate again. Very strange.

The authentication tokens can expire from time to time.

Are you using the RefreshAccess call to refresh the tokens if they are expired? (See also the demo application for an example)
If the refresh does not work for some reason there is no other option than to request new tokens through authentication.

Yes, I used exactly as in the example (code below), there is no way to control this timeout? Why will work with customers (many) who do not have access to our password Google Drive.


DataModulo.GoogleDrive.LoadTokens;
acc := DataModulo.GoogleDrive.TestTokens;

if not acc
then acc := DataModulo.GoogleDrive.RefreshAccess;

if not acc
then Begin
               DataModulo.GoogleDrive.DoAuth;
End
else begin
              DataModulo.GoogleDrive.SaveTokens;
              DataModulo.GoogleDrive.GetDriveInfo;
end;

Expiration and validity of tokens is controlled by the Google API, we have no access to this.


If many users require access to the same data, maybe you could consider to create a shared file using Google Drive instead of giving all users access to the same account?

We have an account of 1TB to send the backup of our customers, each to a folder. I believe that would not give to share and we would compel our client to have a gmail account to work. But I appreciate the explanations.

I think this is really a limitation of the Google API.
Only with a service with a non-expiring token you could implement this by hardcoding your access-token in the app (although you'll need to check with the service specifications whether this approach is in line with their licensing terms)