Skip to content
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

Calendar API missing packages (GoogleWebAuthorizationBroker and FileDataStore) for .net core #897

Closed
brunocasarotti opened this issue Jan 5, 2017 · 18 comments
Assignees

Comments

@brunocasarotti
Copy link

Based on this issue #872 I would like to know if it is possible to integrate an app that I'm doing in asp.net core (it would be a class library project, a service responsible for updating the user's calendar) with the my user's calendar using the google api or any other method that allows me to accomplish this task.

I'm not sure if I'm doing the authentication right as well, see the note below:

Note and question that may be useful: I authenticate my user using Identity Core. I have created an client_id and secrete for my app, but when I login, in the consent screen it doesn't show nothing related to Calendars API, it just says that I am asking for "View your email address" and "View your basic profile info". Do I need 2 client id and secret for that, being one for the login and one for the calendar? I think when I authenticate my user the scope that authorizes me to make changes to the user's calendar should be there as well right? (this may not be related to the question but I'm not sure where should I ask for help for this one)

@LindaLawton
Copy link
Collaborator

Which scope are you requesting?

@brunocasarotti
Copy link
Author

I've followed this tutorial from Microsoft, but I want to ask for this permission of writing and reading the user's calendar when the login into my application.

@LindaLawton
Copy link
Collaborator

That tutorial doesn't use this client library so I don't think we are going to be any help to you. I think you should try asking your question on StackOverflow.Com someone there should be a available to help you.

@brunocasarotti
Copy link
Author

Ok, this is not the main question, what about the packages, can I use the google api .net client to make changes against the calendar running an .net core application? Is there any other way to do that if this is not possible?

@LindaLawton
Copy link
Collaborator

Yes I believe we support .Net core now. I haven't tried it yet. Might want to wait and see if someone else chimes in on this who knows more about it.

@alastairs
Copy link

alastairs commented Jan 16, 2017

I'm experiencing the same issue with the Drive API client on .NET Core. The sample code provided simply doesn't build using the 1.20.0 NuGet package version as both GoogleWebAuthorizationBroker and FileDataStore are missing from the appropriate package(s). Further more, the client reference documentation is now extremely out of date, documenting the 1.10.0 client version.

@jskeet
Copy link
Collaborator

jskeet commented Jan 16, 2017

The sample code builds in a regular console app, but not in a .NET Core console app. While .NET Core is supported, not all classes are present in the .NET Core versions of the packages - as you say, GoogleWebAuthorizationBroker and FileDataStore aren't present in the .NET Core versions.

GoogleWebAuthorizationBroker uses Windows.Storage (not present in Core) so that's not surprising; FileDataStore looks like it could be feasible, but that's only at first glance. @chrisdunelm may have more info.

The reference docs being out of date is a known problem, yes. We're not quite sure what we're going to do about that.

In terms of authentication from ASP.NET Core, you might want to look at the code in the Mvc4 tree. It won't be immediately applicable, but would be a good starting point.

@LindaLawton
Copy link
Collaborator

@JonSkeet how is that documentation built? It's not something I have seen before

@jskeet
Copy link
Collaborator

jskeet commented Jan 16, 2017

@LindaLawton: I honestly don't know. @chrisdunelm knows more about this than me. Maybe we should split that into a second issue though...

@alastairs
Copy link

Great, thanks @jskeet 😄 I'll try switching it over to the full-fat framework and hopefully that will yield better results.

@dpeter99
Copy link

Do you have a planned release for the GoogleWebAuthorizationBroker ? Or any workaround for authorization?

@LindaLawton
Copy link
Collaborator

Last I heard soon

@dpeter99
Copy link

Weeks/months? Should I switch back to .net Framework or not?
Also is there a place where I can ask someone (maybe you as you have already given a fast answer) about the whole google sign in system?

@LindaLawton
Copy link
Collaborator

They were supposed to announce something big last Friday. I would say very soon. If they don't respond I will poke them again.

@jskeet
Copy link
Collaborator

jskeet commented Feb 28, 2017

Just to reassure folks, this certainly isn't an attempt to hide anything. It's just taking longer to write up than we expected, because it's so darned complicated. There are lots of moving parts in terms of dependencies from gRPC, the generated APIs etc :(

@chrisdunelm
Copy link
Contributor

At the moment it looks unlikely that GoogleWebAuthorizationBroker will be supported on .NET Core.

It uses various classes that are not available on netstandard1.3, For example:

I suggest you move to the full .NET framework, or use the GoogleWebAuthorizationBroker.cs code as a model to implement your own version.

@dpeter99
Copy link

https://github.com/dpeter99/GoogleApi.NetCoreFix
Made my own implementation.
Please tell me if I need to change anything because of security or legal problems. 😄

@Charlie-ET
Copy link

+1.
Please take it a priority, it blocks me from using Google Drive API for .net core too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants