Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

OneDrive issue

 Post Reply Post Reply
Author
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Topic: OneDrive issue
    Posted: 19 Jan 2020 at 10:37pm
Hi

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 ?

Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jan 2020 at 11:18pm
ok, i change the URI and it seems to be ok now...  
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2313
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 20 Jan 2020 at 8:29am
Hi,

Thanks for confirming the issue was resolved.
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 23 Jan 2020 at 6:54pm
Hi,

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 :

CloudStorage.ClearTokens;
CloudStorage.Disconnect;

where CloudStorage is a TMSFMXCloudSkyDrive component.


Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 23 Jan 2020 at 8:34pm
I think that deconnexion don't work
If i use your demo, when I check clear tokens, I can reconnect with out credentials :(
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jan 2020 at 7:07pm
No answer ?
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2313
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2020 at 12:52pm
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.

Example:
CloudStorage.ClearTokens;
CloudStorage.Disconnect;
CloudStorage.Logout;
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2020 at 10:45pm
Logout has no effect  :(
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2313
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jan 2020 at 12:08pm
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?
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jan 2020 at 9:59pm
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
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2313
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jan 2020 at 1:33pm
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.

Edited by Bart Holvoet - 29 Jan 2020 at 1:34pm
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 19 Feb 2020 at 7:36pm
The last release of TMS FMX Cloud Pack with ExternalBrowser to True don't work.
I have the same issue, the connection stay alive.
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2313
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 8:26am
Did you try to log out of your OneDrive account from the browser?
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 11:12pm
I have the same code with Drive, OneDrive et DropBox.
It's ok with Drive and DropBox but not working with OneDrive.

Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 9195
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 22 Feb 2020 at 9:48am
But did you try to perform a logout?
Did you try to call ClearTokens?
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 27 Feb 2020 at 8:32pm
Yes of course
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 27 Feb 2020 at 10:28pm
Code I wrote to disconnect :

 CloudStorage.ClearTokens;
 CloudStorage.Disconnect;
 CloudStorage.Logout;
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2313
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 02 Mar 2020 at 8:30am
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.
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 17
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 25 Mar 2020 at 6:12pm
Originally posted by Bart Holvoet

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 ?
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2313
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 26 Mar 2020 at 8:18am
Hi,

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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down