2

I have written code for authenticating with Salesforce. I am using Grant_type=Password. I am using some userName like "ABC" and password like "XYZ". I am making multiple request login with same credentials but i am getting same Access_Token again and again. So my question was-

1) Why i am getting same access token for multiple login request?

2) does Salesforce keeps user credential and Access_Token mapping at his end and check if login request comes again for the same user it returns the previous Access_Token?

3

Access Tokens have fixed Life-Time.

Until that period has not expires, access token remains the same. During that period if you request access token you will receive the same string but will have reset expiration. It would only happen if Location, Password etc are exactly same as previous request. Otherwise new token generated. Sometimes Salesforce resets the expiration time for last expired token and return in response.

Salesforce keeps track of access tokens and manages them optimally to save their servers load. Its all about server optimization with user security.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.