We are exploring the real time updates and need a user token in the front end to establish a connection.
https://github.com/GetStream/stream-js/blob/master/README.md
We see to get a token in the backend you do
user1 = client.feed('user', '1');
user1.token
Since we will need this token in the front end everytime the page loads we ideally don't want to make that request every time so we would like to store the token value for the user locally in our database.
Would this token ever change on us for a user?
Token don't need to be refreshed/regenerated (though it is possible for advanced use-cases to make them expire).
As long as you don't delete the API key-pair for your application the token will keep on working.