Dropbox on .NET Maui
I am trying to get Dropbox to work in .net maui.
I have it working fine in xamarin.ios, it open a browser and get them to login, then when the go back from the browser, the app is receives the redirect in appdelegate.cs to get the auth token and use it to allow the user to access their files.
I am unable to find a way to do that in .net maui. How do I handle the redirect from the browser?
(I can't use webview as dropbox no longer allows that.)
The xamarin.ios parts, this is in the view where I start the dropbox stuff:
NSNotificationCenter.DefaultCenter.AddObserver(new NSString("DropboxAuthorizationCodeNotification"), HandleAuthorizationNotification);
And this in appdelegate.cs:
public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
...
NSDictionary userInfo = NSDictionary.FromObjectAndKey(new NSString(authorizationCode), new NSString("AuthorizationCode"));
NSNotificationCenter.DefaultCenter.PostNotificationName("DropboxAuthorizationCodeNotification", null, userInfo);
...
I am not sure how to recreate this in .net maui and I can't find any examples of using dropbox as they all refer to using webview, which isn't allowed anymore.