We have several applications requesting and updating data in Salesforce through the rest api, this is all working fine on login.salesforce.com. we now are continueing development to test.salesforce.com and are facing regular issues with oAuth2 access
The behavior noticed is that on each request to test.salesforce.com/services/oauth2/token we get a new access token, while on login.salesforce.com we're getting the same accesstoken. Also the token we get back are not valid as then subsequent calls return 401 with "This session is not valid for use with the REST API"
I have checked settings for connected apps and remote access between login and test and they seem to be the same.
Has anyone experienced this behavior and how did you solve it?