Do App Secrets need publishing?

Hello?

I’ve had a strange thing a few times where I have updated the values of App Secrets, but they don’t seem to update in the running app.

They do work after a while, but I don’t know if it is me re-publishing the app which makes the new values live? Or is there some kind of delay between a secret being updated and the new value being available to the live app (i.e. some kind of caching happening?)

It’s one of those things that is winding me up because I can’t understand the behaviour behind it… so any insights welcome! :slight_smile:

Secrets are versioned, so if you are selecting a version to publish using the ‘View history’ window, the value of the secret in the published version will change. Is this consistent with the behaviour you’re observing?

1 Like

This explains EVERYTHING :slight_smile:

I did not realise secrets were versioned… I’ve re-read the reference documentation which does say “secrets are stored encrypted along with the code” but I don’t think I would have realised the implication of this without you prompting me.

It would be good to add a clear statement in the App Secrets documentation to say that they are versioned and therefore must be published :slight_smile:

(Btw I presume the reference documentation is not something I can do a pull request against - as if so I’d be happy to make a suggestion)

I’m glad you mentioned it, it’s always good to find gaps in the documentation.

I’ll update the reference docs (which will hit production in a few days) :slight_smile: