Hi Both, thanks for help. I found out what was the cause of this issue.
in the example I used https://github.com/twitchdev/authentication-samples/blob/master/node/index.js
the request was done to https://api.twitch.tv/helix/users and this is twitch new API.
But in the example they specify scope user_read and this is twitch API v5.
So I tried to set scope to user:read:email and it deliveres then email address.
passport.use(‘twitch’, new OAuth2Strategy({
authorizationURL: ‘https://id.twitch.tv/oauth2/authorize’,
tokenURL: ‘https://id.twitch.tv/oauth2/token’,
clientID: config.twitch.twitch_client_id,
clientSecret: config.twitch.twitch_secret,
callbackURL: config.twitch.callback_url,
state: true,
scope: ‘user:read:email’,
passReqToCallback: true,
}