I have the following issue and need an advice on how to approach it.
I connect to a third party system which generates a JWT token. The problem is that the token expires every 15 minutes and I'am not allowed to refresh it constantly due to the authentication system.
Heres a breakdown:
Token is too long 700 characters and can't be stored in a custom setting/custom metadata type.
Even if I split the token in a few fields I'am still not able to refresh and store it before it expires because you are not allowed to have a DML and a callout in the same transaction.
I don't really want to use a custom object just for the token but is there any other solution here?
Named Credentials
fromApex
, they'd be a good fit here. I'm not sure either way if it's possible.