You don’t, the logic I described was just for getting app tokens.
Twitch doesn’t support “non standard” browsers due to abuse by bad actors. Hence you are having an issue.
Then display the chat embed as normal/documented but the user won’t be able to use it to send messages. Since they can’t login.
Alternatively build your own chat/duplicate of the chat UI using a chat:edit scope token for sending messages. or no token at all if you just need read only chat (and connect to the chat websocket)