The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
// In your app/extension frontend | |
$("#startOauth").click(function () { | |
let btn = $(this); | |
if (!btn.hasClass('is-loading')) { | |
btn.addClass('is-loading'); | |
let authUrl = `https://id.twitch.tv/oauth2/authorize?client_id=${EXTENSION_CLIENT_ID}`; | |
authUrl += "&redirect_uri=" + encodeURIComponent(OAUTH_REDIRECT_URL); | |
authUrl += `&response_type=code`; | |
authUrl += "&scope=" + encodeURIComponent("user:read:email"); |