TTMSFNCCloudStorageServices connection status and disconnect

Good afternoon to all,
i'm going on with cloud ..... and, following the example, now i'm move steps with TTMSFNCCloudStorageServices.
In this component we have onConnect event tha is fired up when the connection is ok.
But if the connection is not ok how i can get this information? (it's also true that, in this case, the browser will open with error page, but i need to show it into the program).
One connected, when all works is end how is possibile disconnect from the cloud service?
Till now i use only dropbox and the service is cssDropBox.

Thank's for attention

Daniele

Hi,

After setting the Service, you can use the following code to connect to the OnAccessDenied event:

  TMSFNCCloudStorageServices1.Service := cssBox;
  TMSFNCCloudStorageServices1.Storage.OnAccessDenied := DoAccessDenied;

Thank's

Hi Pieter,
i setted as your suggestion but, when i set bad data di connect with service (dropbox) what happend is when i try to connect with wrong credentials a dropbox information page is opened into the browser (where indicate that data is wrong, in my case the clied id is wrong) but there's no way to fire DoAccessDenied event.

Can you tel me where i wrong?

Thank's

Daniele

OnAccessDenied is only triggered when the services denies access. Not when you entered invalid credentials. There is currently no event triggered when the user closes the browser or when entering invalid credentials. It's unclear if it's possible to detect that. If that happens, then the application will simply not receive an OnConnected event and nothing will happen. When the service pops up an invalid client-id then you will need to make sure that you enter a valid client-id so the authentication flow can be handled correctly.

When entering a wrong username & password during login, the service itself will prompt invalid credentials, and then you can try again.

Thank's for reply Pieter.