-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate UWP support #983
Comments
I have a question, just out of curiosity: since the library targets .NET Standard 1.3, and that applies to .NET Core as well (so to UWP), how is it possible that right now the latest version (1.25.8xx) can't be installed in a UWP project due to incompatible references? |
@Sergio0694 I also have the same question. I also expected that by supporting netstandard1.3 it should be installable in a UWP project; although there may still be platform-specific problems that occur at runtime. E.g. the netstandard1.3 FileDataStore is almost certainly not suitable for UWP. |
Do we have any timeframe for settings timeframes? |
Hello @chrisdunelm - I've tried to update the library to the 1.26.2.862 version in my UWP project and it still can't get the packages to install correctly due to that missing I'm not sure how's that even possible now, since you said the .NETStandard library (and UWP should target the .NETStandard 1.3 package, since it supports up to .NETStandard 1.4 at the moment) doesn't have any other dependencies other than Newtonsoft.Json (which isn't the issue here). I mean, where is that Anyways, as for the UWP version of the library, in case you can't get the current .NETStandard 1.3 package to work with it, the Fall Creator's Update should bring .NETStandard 2.0 support for UWP apps (.NETStandard 2.0 will also be supported by .NET Framework, .NET Core and Xamarin), and that should include a ton of new supported APIs, so if you plan to release an updated version of the library that targets .NETStandard 2.0, I guess that could help targeting all the different platforms more easily. |
@Piachu91 Sorry, no; we don't have a timeframe for this. @Sergio0694 The |
@chrisdunelm Oh I see, now I understand the issue, thanks! |
If you want to use the library with service account or an API Key you can do it by adding the dlls directly in the project. I can give you a list of the dlls needed. Oauth2 is going to require changes to the library itself. |
@LindaLawton Thanks for your help - unfortunately last time I checked (back with version 1.23.something when I could still get the library to compile in my UWP app, before the .NET Native toolchain was updated) there was another issue ( #838 ) that made it impossible to use the library (at least in my case). So I guess I'll just have to wait for the official UWP investigation so that hopefully you guys will find a workaround for that issue, it's probably just the .NET Native compiler that's messing something up, as the debug build of the app worked perfectly fine (it was just the release build that had that issue). |
@chrisdunelm Hello Chris, I just saw that this issue has been moved to version 1.29 and I was just wondering: since I saw that all of the original issues in version 1.27 are already completed by now (even though the original due date was the 5th of June), and the only remaining issue (that .NET Core support for an API) has been moved to version 1.28, is this just a formality so that you'll release version 1.27 sooner and 1.28 the 5th (so the overall schedule will more or less remain the same), or do you plan to add more issues to version 1.28 and to postpone the actual version 1.29 with the UWP investigation? Just curios, I was trying to understand when to expect the works on the UWP support to start, I'm looking forward to be able to use the library again in my app! Keep up the good work! 😄 |
@Sergio0694 I expect v1.27 to be released tomorrow (1st June); but if anything blocks it, then it will be released on Monday 5th (we generally don't do releases on Fridays, Saturdays or Sundays). The ASP.NET Core auth issue #933 is moved to v1.28 because I don't want it to block the v1.27 release, and I suspect it's going to take some time to get done. This is because I've not done any ASP.NET Core development, and I need to understand how auth fits into ASP.NET Core before deciding how best to support Google Auth. After v1.28 is done, I'll be starting on UWP for v1.29 Please note that I do have work outside of this repo, so if progress appears to stall for a while, it's probably just because there's other work I'm needing to do. |
@chrisdunelm I understand, and that's good to hear anyways, I guess you'll be able to start looking into the UWP support by the second half of June then! I know you also have other work to do outside this repo, that's why I really appreciate all the effort you're putting into it, thanks again! 👍 |
@chrisdunelm So you're saying that the Google.Apis.Auth and Google.Apis.Drive.v3 apis will actually work in my UWP app in the near future??? I hope so. Spent a year learning C# and then put a year into developing my app. A few days ago I realized that the APIs I was looking to use don't even work on my platform of choice, and the last think I want to do right now is delve into REST API programming! I just KNEW things would work. |
@chrisdunelm any news or timeline on this? |
Work has (finally) started on this. Tentative mid-September release date. |
@chrisdunelm That's awesome, thank you so much for your effort! 😄 |
Release of this has been pushed back to the end of September. |
When you have a working sample let me know and i will add it to the samples build project. |
This is now in beta on nuget, and ready to test. The API packages, e.g. Please post any comments, bugs, or missing features here whilst this is still in beta. Thanks :) |
@LindaLawton Thanks, I'll try to sort out a sample soon... |
@chrisdunelm It's so great to be able to test a beta version, great work! 😄 It seems to be working (at least partially), I've managed to login, to upload a file to GDrive and to browse my remote files from a UWP app. |
@Sergio0694 Glad to hear it's working :) The options are either to throw an exception if a |
@chrisdunelm I'll also definitely gonna test this out, but after my vacation, so second half of october |
@Piachu91 yea, that's kinda my point. I'm not going to waste time (and money) implementing my own solution if this project will add support for it soon. It was marked for v1.31, then postponed without explanation ("chrisdunelm removed this from the v1.31 milestone on Dec 8, 2017") . So...will it be available soon or should I assume that it will not be, and thus I should try to create my own solution? No one seems to want to answer that. |
I understand that its frustrating but the developers who work on this project do so in their free time. Which is understandably under a lot of demand. Things get done on open source projects when the developers have time. |
@chrisdunelm Just checking in. On Nov 20 I posted that my OAuth2 workflow using the dotnet API libraries v1.31.0 beta 01 is working for my UWP C# app. Any update on when the fix will find its way into your mainstream library? Just asking because the same authorisation flow does not work in the v1.32 releases. If I am not mistaken, I think you fixed it in the beta release by defaulting the datastore on UWP to PasswordVaultDataStore on the GoogleWebAuthorizationBroker.AuthorizeAsync() call. |
Any updates on this? |
@tipa The library is in maintenance mode I wouldn't Feel free to fork the library and add it yourself. |
UWP always get screwed over. I've been waiting about 2 years for a proper fix to this. |
At a team discussion in October 2018 we made the decision to not proceed with support for UWP. We will revisit this decision on a regular basis, in case the situation changes. |
This was expected at this point, but I'd like to point out to @Acinity and @Piachu91 that it's is actually possible to use the latest version of the Google Drive APIs in UWP apps without problems, you just have to manually copy-paste the two classes (first and second) to handle the local access tokens. I mean, it'd be nice to have built-in support for that, but at least it still works with little to no effort 👍 |
@Sergio0694 Thanks for pointing out that this can be made to work on UWP without too much effort. |
@Sergio0694 I added the 2 classes as you explained. I replaced the FileDataStore with the PasswordVaultDataStore. Now when trying to do the AuthorizeAsync It keeps coming up with this error from Windows. Would you know what is causing this? Or better yet, do you have working sample code? credential = GoogleWebAuthorizationBroker.AuthorizeAsync( |
@cmassman You need to pass an instance of |
Just a shout out from a UWP developer who has been using version 1.13.1 until it broke today, I just updated to 1.37.0 and copy-pasted above classes, seems to work again. If you're still tracking "usage" of this lib, you can +1 for me |
Year 2021. Nothing changed. UWP is still not supported. Nice... I just tried to reference the latest version and then tried version 1.37.0. They didn't work. I added the two files that were mentioned to my project and called
It didn't work either. In the UwpCodeReceiver at the line
The result.ResponseStatus is UserCancel and then it throws an exception. Any ideas? May be there is finally a fully functioning in UWP fork? |
@alex4998: No, We haven't had any time to put into UWP (or Xamarin, or Unity) I'm afraid. |
But now I wonder if that trick with those two files really worked and why it doesn't work now. |
@alex4998: It's certainly curious, but unfortunately we don't have time to investigate that aspect either. |
If anybody cares UserCancel was happening because WebAuthenticationBroker.AuthenticateAsync was called on a non-UI thread. Completely misleading error/status. I wrapped it into this and it started working:
|
Hi Alex, I tried the code you proposed but I can't authenticate my app. After successful authentication, can you invoke a Google service? I can't. I'm new to c# and uwp and maybe I'm more wrong than something. My app connects to Classroom goggle API. The Console version works with the GoogleWebAuthorizationBroker.AuthorizeAsync method, I would like to make it a Uwp version but it is known that this does not work with uwp. UserCredential credential = new UserCredential(flow, "user", token);
I can't create usercredentials because in the result of your code I don't know how to get the right information. The console version receives, and writes data such as these to a json file: { |
What is the conclusion for this? Uwp is still not supported? |
@EmilAlipiev: Correct. With the changes in UWP over the years, I suspect it's more feasible than in the past - if you basically bundle .NET with the app, for example, then to most intents and purposes it's "just a .NET app". (Indeed, I have a personal app that uses the Storage API via a service account, and I've had not problems with it.) Unfortunately there are just too many quirks and deployment options for us to actively support and test it. |
@chrisdunelm We've been using your above solution in our UWP app, however now that support for the OAuth out-of-band flow is being removed do you have any idea how to update it so it will continue working? |
Chris is no longer working on the team - but the OOB flow has been deprecated and will be completely blocked by the backend by the end of January 2023, according to this migration guide. We still don't have sufficient resources/demand to support UWP in our client libraries, and I'm afraid that includes re-investigation of previous workarounds. As I noted in November, it's possible that the regular .NET option of |
Authorization with UWP seems to work fine with Maui, running locally. @MartinRichards23 is this a pure UWP app? Have you tested with standard windows desktop authorization?
|
Just a side note, I was using the client to sign in users to Firebase, until it broke for me. So instead I switched to full Firebase UI solution - https://github.com/step-up-labs/firebase-authentication-dotnet I know this isn't a solution to everyone, but maybe a few who also use Firebase. |
@bezysoftware does that give you access to all google apis? or just firebase stuff? I need to give it a try |
@LindaLawton It is a pure UWP app. I tried your example, it fails in The next issue is that UWP doesn't allow the |
So Google doesn't allow for <sarcasm>isn't that special</sarcasm> If this the case I wonder how UWP handles Authorization internally. There must be another way. |
An item from future planning in #787.
The text was updated successfully, but these errors were encountered: