I am trying to use the TADVDropbox comment's Logout procedure. the is no (and I mean absolutely no) documentation on this issue. Wading through the code, I see that the procedure supposedly sends an HTTPS://www.Dropbox.com/Logout, that actually what I want.
ADVDropbox.Logout works at the level of the component using the REST API to get access to DropBox files and this is unrelated to a login/logout scenario in a separate browser instance.
When you perform logout, it should forget about your access token and when you want to perform the AdvDropbox.Connect to get access to your files again, prompt again for authentication & authorization (and thus allow to login with a different acocunt to authorize a different user)
Thanks, that sort of clears up what is SUPPOSED to happen.
WRT the behaviour, the logout function supposedly send an https://www.dropbox.com/logout.
In my case it appears to do nothing at all. I would assume if I had an INI file with the tokens, then it should remove those tokens and / or revoke the tokens (I don't know if https://www.dropbox.com/logout calls the API V2 Revoke endpoint). I can confidently say that after calling ADVDropbox1.Logout:
The Access and Auth tokens are still in the INI File
When I re-run the application I AM NOT PROMPTED FOR CREDENTIALS
I can still access all of the properties of ADVDropbox1 for the user that was supposedly logged out
In the simplest test, if I perfumed a ADVDropbox.logout I should be forced to log back in at the next session?
For clarity, here is my sign-in code:
procedure TfTest.Button18Click(Sender: TObject);
AdvDropBox1.ExternalBrowser := True;
if AdvDropBox1.Connect then
showmessage('Conncted is TRUE')
showmessage('Conncted is FALSE') ;
isConnected := AdvDropBox1.TestTokens;
if not(isConnected) then
aNotification.Title := 'No INI file with Credentials';
aNotification.AlertBody := 'You need to authorise Dropbox';