Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx
Created March 10, 2021 00:38
Show Gist options
  • Save xximjasonxx/e7b37a047fa1bd9941b7f6f1c4c0f44a to your computer and use it in GitHub Desktop.
Save xximjasonxx/e7b37a047fa1bd9941b7f6f1c4c0f44a to your computer and use it in GitHub Desktop.
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