We are writing our first custom provider for Metabase. We have gone through the tutorial & have been able to do CRUD on a basic resource.
As part of authentication, Metabase generates a session-id
and expects clients to cache it for 14 days. Link to docs. The login endpoint is rate-limited so this is mandatory.
We are thinking of saving this session-id
after 1st login into the state. On subsequent runs,
we would fetch it again from the state & use it to log in. If authentication fails, we would log in with username/password again & update session-id
in the state.
We are trying to find a way to do this & haven’t been able to figure it out.
- Is this something that should be done in the
ConfigureContextFunc
? - If yes, do we put it in
ResourceData.meta
viaInstanceState.Meta
? - Is there a better, more idiomatic way?
(Apologies if this is something basic or mentioned in the docs)