Answer the question
In order to leave comments, you need to log in
How to store user credential using Google API .NET library?
I am using Google .NET OAuth2 library for user authorization. In addition, I need access to user data (for example, to calendars).
In Google examples, there is this piece of code:
var result = await new AuthorizationCodeMvcApp(this, new AppFlowMetadata()).
AuthorizeAsync(cancellationToken);
var service = new CalendarService(new BaseClientService.Initializer
{
HttpClientInitializer = result.<b>Credential</b>,
ApplicationName = "ASP.NET MVC Sample"
});
var items = service.CalendarList.List().Execute().Items;
Answer the question
In order to leave comments, you need to log in
an object can be stored within the same class, but if you need to drag it between different parts, you can serialize it and store it wherever you like, even in cookies
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question