How to authentication with Xero and salesforce without repeating authentication steps using apex?

51 Views Asked by At

Could you please help how to authentication with Xero and Salesforce using apex without repeat steps of authentication process on Salesforce side? As of now I used refresh token but it's expire after 60 days and I have to do authentication again. How can I get rid of this? Please help.

I tried refresh token but it still expire after 60 days and I have to do authentication again. How can I remove this authentication steps again and again?

1

There are 1 best solutions below

2
On

Utilising the offline_access scope, you get a refresh and access token.

The access token lasts 30 minutes and the refresh token lasts for 60 days or until it used in a refresh call when you need a new access token.

When you make a refresh call, you get a new access and a new refresh token.

As long as you are refreshing regularly and storing the new refresh token, you shouldn't need to reauthenticate in Salesforce