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.