Passport authentification - client server - headers issues

Hey

Thanks to the answer.

I’ve already make the OAuth on my API side, and it’s working. When I’m calling my API in browser an authentification on Twitch ( with passportjs ) is lunch then the callback function from my API is call and a json is generate with the user OAuth authenticated.

API
The OAuth Twitch :
app.get(‘/twitchAuth’,
passport.authenticate(‘twitch’, { scope: ‘user_read’ })
);
The callback :
app.get(‘/twitchAuth/callback’, function(req, res, next) {
passport.authenticate(‘twitch’, function(err, userTemp, info) {

return res.status(200).send({
id: user.id,
username: user.username,
email: user.email,
roles: ‘ROLE_STREAMER’,
token: token

My problem is to lunch the call API from the client side React JS .

I tried to get this URL with axios :
hostapi:portapi/twitchAuth

The authentification on twitch is lunch but I got an error in the callback function. Im just trying to acces to the json rended by my api but the error in the console in a picture above is about Headers from twitch. There is an URL in the error message and when Im clicking on it, Im getting the Json from my API.