Did anyone find a way to ‘persist’ a changing refr...
# meltano-plugin-development
p
Did anyone find a way to ‘persist’ a changing refresh token in between tap runs? There are some APIs that invalidate the refresh token every time it’s used to generate a new access token. I found this issue on Github, but it doesn’t seem like we got to a consensus about what’s the most reasonable approach up to this point. For context, I’m running meltano on an ephemeral container, so a potential solution would involve storing and retrieving the new tokens from an external system or — preferrably — use meltano’s DB to store and persist the newly generated token between runs. Did anyone face this same issue? Any viable workarounds using Meltano’s SDK for this particular use case?
1
👀 1
e
I think we'd need support at both levels: 1. The SDK should allow taps to write back to the settings file. This is much easier imo than adding settings backends to the singer-sdk. See https://github.com/meltano/sdk/pull/2346 for one potential implementation. 2. Then Meltano should be able to process any updates to the ephemeral config file and write-back to one of its persistent setting stores (just the system db at this point). One workaround is to write a custom file watcher that checks for changes to the generated config.json file and write the settings to your own custom backend that you inject on the next run. I would like Meltano to support custom setting stores in a similar manner to https://github.com/meltano/meltano/pull/8367, but that's another whole discussion 😅