I would like to use the .NET client API to authenticate a user & authorize a web server application - using the Google.Apis.*
packages from NuGet.
I had a look at the samples and have understood how the NativeApplicationClient and WebServerClient are used there. I had particular look at the "Tasks.ASP.NET.SimpleOAuth2" sample. But what I'm trying to achieve is to perform the authentication without any call to the Google service I want to ultimately use, whereas in the samples, the authentication is initially setup and "automatically" called upon the first request to the service.
Let's say my app would like to use Calendar. So I would like to use the SDK to:
- generate the authentication URL (kind of OutgoingWebResponse) that I would pass to my client
- validate the code and get the access token once I got the redirect
but without any actual call to the Calendar service at this step.
Any guidance would be greatly appreciated here. Thanks