c# - Google authentication in portable class library -


i write portable application (windows store, windows phone, windows). use portable class library. see google make tasks api library (windows store, windows phone, windows). have problem google auth.

this code not work in portable library, (it's works on windows phone):

        private observablecollection<string> _tasklisttitlescollection = new observablecollection<string>();      public observablecollection<string> tasklisttitlescollection     {         { return _tasklisttitlescollection; }         set { _tasklisttitlescollection = value; }     }      public async void myfuncrion()     {         usercredential credential = await googlewebauthorizationbroker.authorizeasync(             //new filestream("client_secrets.json", filemode.open, fileaccess.read),             new clientsecrets             {                 clientid = "", //"put_client_id_here",                 clientsecret = "" //"put_client_secrets_here"             },             new[] { tasksservice.scope.tasks },             "user",             cancellationtoken.none);          var service = new tasksservice(new baseclientservice.initializer()         {             httpclientinitializer = credential,             applicationname = "tasks api sample",         });          tasklists results = await service.tasklists.list().executeasync();          foreach (var tasklist in results.items)         {             tasklisttitlescollection.add(tasklist.title + " " + tasklist.updated);             // can data file (using file.title example)             // , append textbox, list, etc.         }     } 
  1. i want use library works tasks/books, want store usercredential in windows conteiner encryption(google store in app folder)
  2. how can crete usercredential credential myself, without set return value googlewebauthorizationbroker.authorizeasync, have access code , want past here?

thanks!


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -