How to set a Environment Variables for Frontend

Hi @Dist, thank you for your detailed answer. Now I got a better understanding of this concept.

So as you explained above, no matter which method(OAuth implicit code flow or OAuth authorization code flow) I use, at the very first time, in order to get an OAuth Token, a user has to complete the authentication flow by himself/herself, like using a customise login page or using a third-party tool like the https://twitchapps.com/tokengen/.

Then after this first-time authentication, I can use fetch/axios/cURL in my own Backend Server to query this URL with a POST method to update the OAuth Token as follows:

POST https://id.twitch.tv/oauth2/token
    ?client_id=<your client ID>
    &client_secret=<your client secret>
    &code=<authorization code received above>
    &grant_type=authorization_code
    &redirect_uri=<your registered redirect URI>

Hopefully, I fully get the idea this time.

Thank you again.