Allow users to set ShowDialog when using WebAPIFactory (#239)

This commit is contained in:
Alessandro Attard Barbini 2018-04-24 17:19:06 +02:00 committed by Jonas Dellinger
parent e661d8f35b
commit 91b088169b

View File

@ -42,13 +42,14 @@ namespace SpotifyAPI.Web.Auth
_xss = xss; _xss = xss;
} }
public Task<SpotifyWebAPI> GetWebApi() public Task<SpotifyWebAPI> GetWebApi(bool showDialog = false)
{ {
var authentication = new ImplicitGrantAuth var authentication = new ImplicitGrantAuth
{ {
RedirectUri = new UriBuilder(_redirectUrl) { Port = _listeningPort }.Uri.OriginalString.TrimEnd('/'), RedirectUri = new UriBuilder(_redirectUrl) { Port = _listeningPort }.Uri.OriginalString.TrimEnd('/'),
ClientId = _clientId, ClientId = _clientId,
Scope = _scope, Scope = _scope,
ShowDialog = showDialog,
State = _xss State = _xss
}; };