Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx

xximjasonxx/login.cs

Created Mar 10, 2021
Embed
What would you like to do?
public IActionResult Get()
{
var redirectUri = WebUtility.UrlEncode("https://localhost:5001/home/callback");
var urlString = @$"https://id.twitch.tv/oauth2/authorize?client_id={_configuration["TwitchClientId"]}"
+ $"&redirect_uri={redirectUri}"
+ "&response_type=code"
+ "&scope=openid";
return Redirect(urlString);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment