CORS Error, .NET 7 and ReactJS

Well it looks like you did a fetch for https://id.twitch.tv/oauth2/authorize which of course doesn’t have a Twitch Session to use, so Twitch redirects to the Twitch login page to get the user to login.

So you need to redirect the web browser to https://id.twitch.tv/oauth2/authorize not fetch it.

If you are sending the user to the page then you won’t get a cors error.

Since to do user oAuth you literally need to redirect the user to the service you are wanting to get tokens for.

IE they leave your website for another, then come back to your website with the code (or token depending on flow)

So for example, using implicit auth: Twitch Implicit Auth Example a <a href=" eixsts to redirect the user to Twitch and after granting access they are returned to this example