-
Notifications
You must be signed in to change notification settings - Fork 525
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
Add .net core support for Google.Apis.Auth.Mvc #933
Comments
Assigned to Chris for initial comment, as I can't remember what the status is here. Although if Google.Apis.Auth.Mvc targets "full" ASP.NET, I'm not sure it makes much sense to support it on .NET Core - we'd want something which targets ASP.NET Core instead. If it's neutral though (it doesn't look like it has a dependency on ASP.NET...) it would make more sense. |
I'll have a look soonish to see if .NET Core support for Google.Apis.Auth.Mvc makes sense. |
Hi there, Update: If it makes any difference, I'm using asp.net core on top the full .net framework (not .net core) so I'm happy to use any lower level apis that may be available in the existing nuget package targeted at the full .net framework. I can probably just reimplement the controller myself and inherit from the asp.net core controller class instead of the asp.net one, but I'm just not sure how to go about this... Thanks |
Maybe using Google.Apis.Auth instead of Google.Apis.Auth.MVC? |
I believe this uses asp.net 5 but not asp.net core... |
That's all we have then. I don't think anyone has done any Core samples yet. |
I see. I guess I'll have to figure out on my own. |
If you have any issues put up a question on stackoverflow tag it google-api-dotnet-client I will try and help |
I would like to see some NET core MVC samples too. |
Please help me on Stack overflow about this issue. I'm totally stuck and my app is vulnerable at the moment because I cannot verify in-app purchases on the server side... |
I've answered the Stack Overflow question, but please note that the MVC package is designed for user authentication, not service account authentication. |
@jskeet, do you have any a link for Stack Overflow or other reference for User authentication accessing Google API, e.g. Calendar API like in the sample. I still can't find anything useful for awhile. Thanks in advance! |
@neooleg: From what platform? You say "like in the sample" - what are you trying to do that's different from the sample? |
@jskeet: Platfrom is .NET Core 2.0 I try to do exactly the same -- call Calendar API using .NET Core and Google OAuth 2.0. However, the following code from the sample doesn't work on Core because OWIN I guess:
|
But the sample isn't using .NET Core - it's using ASP.NET MVC. Basically, what you're requesting is that this issue is fixed - ASP.NET Core support in the same style as Google.Apis.Auth.Mvc. |
Sure, I know. However, what I've missed it seems -- is that not only the sample is outdated (i.e. isn't .NET Core), but the library which required to allow API calls working is also not updated for .NET Core. In other words, there is no ability to call Calendar API from .NET Core for now. |
The sample isn't "outdated" in that there are still plenty of users who will be using ASP.NET rather than ASP.NET Core. And you certainly can call the Calendar API from ASP.NET Core now - but you'd need to reimplement the functionality provided by the Google.Apis.Auth.Mvc library. All the code is available, and there's not a huge amount of it. If you wanted to create a pull request to fix this issue yourself, that would be most welcome - it's just been lower down our priority list than other work. (There may be other OAuth2 libraries that would do the bulk of the work, leaving you just to create the final token, too.) |
@jskeet: Thanks for complete answer! I'll investigate it detailed. P.S. Apologize me to use inappropriate word for sample characteristic. I just meant it doesn't support .NET Core. |
I forked this and have a version that works for Mvc Core apps. Wanted to pass what I did by and if the way I set it up is OK then I'll submit a PR. Notes:
|
@buzallen thanks for update! Few questions:
|
1 - I certainly can create a sample, I have a basic proof of concept app I created when I updated the library. If anyone has thoughts on this or if it makes sense for me to generate a PR with what I have let me know. |
I´m looking for a working sample too. |
@buzallen Could you add the PR and sample, please? |
Hi, |
Support for ASP.NET Core 2.0+ is now available in the |
@chrisdunelm is there a sample code for using this anywhere? https://www.nuget.org/packages/Google.Apis.Auth.AspNetCore/1.36.1-beta01 |
the only example we have for asp .net core is the tests themselves. I tried to put together a sample a few weeks ago and was unable to get it to work. It would authenticate but when trying to access an API I was getting unauthorized I suspect it was cookie related I haven't had time to look into it further. |
My understanding, currently Google.Apis.Auth.Mvc does not build for .net core. Please support .net core.
The text was updated successfully, but these errors were encountered: