How to securely use an oauth token in front-end javascript
问题 What I'm trying to connect to the Twitch IRC via this library called tmi.js, which requires a Twitch username and oauth token to login. I can do this without much issue, I just hard code: identity: { username: newbot password: oauth:123123 } With this I can connect to Twitch chat channels and do whatever I need to do. However, anyone can just inspect the page, look at the javascript here and take my bot's oauth token. I tried looking up some ways to securely use this oauth token but got