How to set a Environment Variables for Frontend

The Implicit auth flow (like those used by 3rd party token gen sites) don’t come with a refresh token, so for that flow the user would need to go through the process each and every time the token expired.

For the Auth Code flow the process is:

  1. Send the user to the Twitch Auth page, with your apps details in the url as documented.
  2. User is redirected to your server with a code
  3. Your server exchanges that code for an Access Token and refresh token (this is a 1 time thing, the code can only be used once).
  4. To get a new user token programmatically from here on, use the refresh token from step 3. With the Refresh Token process Authentication | Twitch Developers