// Fires when library detects that authorization has completed private static void onAuthorizationDetected(object sender, TwitchLib.Events.API.ThirdParty.AuthorizationFlow.OnUserAuthorizationDetectedArgs e) { Console.WriteLine("Authorization detected! Below are the details:"); Console.WriteLine($"Flow Id: {e.Id}"); Console.WriteLine($"Username: {e.Username}"); Console.WriteLine($"Token: {e.Token}"); Console.WriteLine($"Scopes: {String.Join(", ", e.Scopes)}"); }
// Fires when library detects that authorization has completed private static void onAuthorizationDetected(object sender, TwitchLib.Events.API.ThirdParty.AuthorizationFlow.OnUserAuthorizationDetectedArgs e) { Console.WriteLine("Authorization detected! Below are the details:"); Console.WriteLine($"Flow Id: {e.Id}"); Console.WriteLine($"Username: {e.Username}"); Console.WriteLine($"Token: {e.Token}"); Console.WriteLine($"Refresh: {e.Refresh}"); Console.WriteLine($"Scopes: {String.Join(", ", e.Scopes)}"); Console.WriteLine(); Console.WriteLine("Verifying refresh functionality..."); var resp = api.ThirdParty.AuthorizationFlow.RefreshToken(e.Refresh); Console.WriteLine($"Refreshed token: {resp.Token}"); Console.WriteLine($"Refreshed refresh token: {resp.Refresh}"); }
private void onAuthorizationDetected(object sender, TwitchLib.Events.API.ThirdParty.AuthorizationFlow.OnUserAuthorizationDetectedArgs e) { MessageBox.Show($"Authorization detected!\nUsername: {e.Username}\nToken: {e.Token}"); }