Open Anton0123 opened 6 years ago
Thanks @Anton0123 do you want to put in the work to update it?
I think all that needs to be done is to change the TwitchAuthenticationOptions to:
private const string AuthorizationEndPoint = "https://id.twitch.tv/oauth2/authorize";
private const string TokenEndpoint = "https://id.twitch.tv/oauth2/token";
private const string UserInfoEndpoint = "https://api.twitch.tv/helix/users";
And on line 90 in TwitchAuthenticationHandler.cs to get the user:
var userRequest = new HttpRequestMessage(HttpMethod.Get, Options.Endpoints.UserInfoEndpoint); userRequest.Headers.Add("Authorization", Uri.EscapeDataString("OAuth " + accessToken));
I haven't tested this and I'm a bit unsure if the headers are right
The Twitch provider is currently using the old kraken V5 API which has been deprecated and replaced by the new helix API.