My goal: Resource with custom auth refreshes automatically when token is expired
Issue: Resource does not refresh on token expiry, have to manually re-auth
Steps I've taken to troubleshoot:
Additional info: (Cloud or Self-hosted, Screenshots)
I think I read somewhere that auth refresh is not supported in workflow runs, but can’t seem to find it. Refresh works fine when triggering manually. Am I missing something or is this a caveat when using custom auth?
You can use a custom auth resource inside of a workflow. I have to acquire a new token using an API POST request every workflow run and was able to achieve this by using the Refresh Auth Workflow to basically duplicate the initial token request and setting the trigger to be "Every query run”:
You could also use this workflow to query an endpoint for a response status (200 vs 400) or set it to be refreshed on a timed schedule (every hour, day, etc…).