I've upgraded my FMX Cloudpack with the last release and since, OneDrive access don't work.
First, I see the OAuth form displayed. I input mail and password ok.
But when I want to access, I see the OAuth form redisplayed with only "CLOSE" button and after 2 seconds, the form is closed and nothing append (see screen capture)
Same code with Dropbox and GoogleDrive and it works...
Any idea ?
ok, i change the URI and it seems to be ok now...
Thanks for confirming the issue was resolved.
Finally, the problem is not resolved.
it happens when I try to disconnect by erasing the tokens
The following connection does not work. The OAuth screen is only displayed with the "Close" button as shown in the screenshot and closes after 2 or 3 seconds
To deconnect I wrote this :
where CloudStorage is a TMSFMXCloudSkyDrive component.
I think that deconnexion don't work
If i use your demo, when I check clear tokens, I can reconnect with out credentials :(
This most likely happens because you are still logged in for OneDrive in the browser. Therefore tokens are automatically provided without the need of logging in first.
The solution is to force a log out with the Logout call.
I have not been able to reproduce this issue.
Can you please provide the following information?
- Which version of Android are you using?
- Does the issue also occur on Windows?
Storage.Logout runs in Windows (your demo project)
But on my android app, don't work (android 8.0.0)
I can see a part of web browser with only CLOSE button at the first connect after logout.
If I retry a second time, I can access to my onedrive data without credentials
I have now been able to reproduce the issue. The issue is caused by an incompatibility between the internal browser and the API service. To avoid this the ExternalBrowser property has been implemented for the TTMSFMXOneDrive component (this property is already available for some other services like DropBox and GDrive). This way the authentication occurs in an external browser window and you can manualy log out by starting the browser seperately from the application.
The update will be available with the next release of TMS FMX Cloud Pack.
Bart Holvoet2020-01-29 13:34:04
The last release of TMS FMX Cloud Pack with ExternalBrowser to True don't work.
I have the same issue, the connection stay alive.
Did you try to log out of your OneDrive account from the browser?
I have the same code with Drive, OneDrive et DropBox.
It's ok with Drive and DropBox but not working with OneDrive.
But did you try to perform a logout?
Did you try to call ClearTokens?
Code I wrote to disconnect :
Please note that Logout will have no effect when ExternalBrowser is set to True. You would have to logout from your Microsoft account from the browser window.
But how to made this by code ?
Why I have no problem with Google Drive and DropBox ?
Please note that it's a security limitation to programmatically logout from an external browser window.
Different services use different behaviour and different techniques to persist data in their pages, unfortunately we have no control over this.