I am developing an application for Windows Phone 8.1 which will use Google Blogger Api. For authorization I am using the GoogleWebAuthorizationBroker.AuthorizeAsync() function and everything is alright with that, I can do everything with my blog (get the blog/post lists, edit, delete, add posts ...).
When my application opens at first it calls GoogleWebAuthorizationBroker.AuthorizeAsync() function and in case when the user is already logged in (previously authenticated and authorized) the function returns and redirects to start page where I put the list of blogs. This is fine for me.
My problem is: When the user is not logged in I want to open another page ('welcome' page) where I will have some basic info about my application and sign in button. When user clicks that button in that case only I want to call GoogleWebAuthorizationBroker.AuthorizeAsync() function which will redirect me to sign-in page. But I couldn't find method to check if the user is already logged in and only in that case show the 'welcome' page.
Here is how I am using GoogleWebAuthorizationBroker.AuthorizeAsync() function.
m_credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
ClientId = "my_client_id",
ClientSecret = "my_client_secret"
},
new[] { BloggerService.Scope.Blogger },
"user", CancellationToken.None);