Hi, I downloaded the nodejs twitch sample app from https://github.com/twitchdev/authentication-samples and modified it.
First time after starting the app, I verify with oauth redirect url and then I get access token and refresh token. Here, I found access token’s expires_in field usually have about 4 hours. Therefore, I refresh with refresh token to get new access token every 4 hours. And use this new access token for any job for next 4 hour.
However, at some point the app terminates for the reason which I haven’t found yet.
Is this correct way to do so? I wondered if I was doing wrong so the app crash happens due to my incorrect way.
Also it looked like that refresh token never changes even after I get new access token. It always returns different access token but with same refresh token whenever I refresh. Is this correct that I was supposed to refresh with only one refresh token, which is given at only the 1st time via oauth redirect, permanently if the app goes live permanent length of time?
Thank you very much.