public async Task <ActionResult> UserDataAsync(CancellationToken cancellationToken)
        {
            var result = await new AuthorizationCodeMvcApp(this, new AppFlowMetadata()).AuthorizeAsync(cancellationToken);

            if (result.Credential != null)
            {
                var service = new Google.Apis.Oauth2.v1.Oauth2Service(new BaseClientService.Initializer
                {
                    HttpClientInitializer = result.Credential,
                    ApplicationName       = "oauthdemo"
                });

                var profileRequest = service.Userinfo.V2.Me.Get();
                var profile        = profileRequest.Execute();
                return(View(profile));
            }
            else
            {
                return(new RedirectResult(result.RedirectUri));
            }
        }
        public async Task<ActionResult> UserDataAsync(CancellationToken cancellationToken)
        {
            var result = await new AuthorizationCodeMvcApp(this, new AppFlowMetadata()).AuthorizeAsync(cancellationToken);

            if (result.Credential != null)
            {
                var service = new Google.Apis.Oauth2.v1.Oauth2Service(new BaseClientService.Initializer
                {
                    HttpClientInitializer = result.Credential,
                    ApplicationName = "oauthdemo"
                });

                var profileRequest = service.Userinfo.V2.Me.Get();
                var profile = profileRequest.Execute();
                return View(profile);
            }
            else
            {
                return new RedirectResult(result.RedirectUri);
            }
        }