Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3721

Always prompt user to select an account on application start

$
0
0

I'm using the code from the code samples to authenticate user on application start.

UserCredential credential;using (var stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read)){    credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(        GoogleClientSecrets.Load(stream).Secrets,        new[] { YouTubeService.Scope.Youtube },"user",        CancellationToken.None,        new FileDataStore(this.GetType().ToString())    );}var youtubeService = new YouTubeService(new BaseClientService.Initializer(){    HttpClientInitializer = credential,    ApplicationName = this.GetType().ToString()});

Everything works fine except that I want to force the Select Account screen to show every time (now it only shows the first time, and then after that the user is remembered) because the application is supposed to allow different users to log in.

Looks like that I'm supposed to set the prompt request parameter to select_account, but I don't know how am I supposed to do this, AuthorizeAsync method doesn't accept any additional arguments.


Viewing all articles
Browse latest Browse all 3721

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>