The URI you set when you created the application in your Twitch account settings and the one pass to “kraken/oauth2/authorize” must be exactly the same for this error will occur.
The subdomain (with or without www) that you are hosting your website on does not matter as long you match your app settings to the authorize call.
You should explicitly/manually set the Redirect URI in the Twitch.init call:
<script src="https://ttv-api.s3.amazonaws.com/twitch.min.js"></script>
<script>
Twitch.init({
clientId: 'YOUR_CLIENT_ID_HERE',
redirect_uri: 'http://www.mydomain.com'
}, function(error, status) {
// the sdk is now loaded
});
</script>
Of course be way about if your Twitch Application has a / on the end of the callback URL or not and update redirect_uri accordingly (for a while I was stumped as safari was being an ass and autocompleting the field with a / on the end)