omniphx / forrest

A Laravel library for Salesforce
https://omniphx.github.io/forrest/
MIT License
259 stars 120 forks source link

No Token available after some idle time #328

Open jorisvan-ons opened 1 year ago

jorisvan-ons commented 1 year ago

I am using the WebServer authentication method. When I hit the /authenticate route everything works fine. However, after some idle time on the server the session/token is expired (I assume). Subsequent API requests are therefore failing with the "No token available" error message.

Is there a way for me to programatically authenticate? Forrest::authenticate() doesn't work unfortunately.

Much appreciated!

jorisvan-ons commented 1 year ago

Still having this issue, any help would be highly appreciated!

omniphx commented 1 year ago

Hi @jorisvan-ons, when you configured your Connected App in Salesforce did you include the scope: "Perform requests at any time (refresh_token, offline_access)"? Without this, there is no way to refresh an expired token