Using secret in function with new Values system?

In a previous version of MongoDB, where Values and Secrets were two distinct things, I created some secrets that I linked to values. I was able to get the values of those secrets from Realm functions using context.values.get("secretName"), and I’m still able to do that.

Recently I created new secrets, this time using the new MongoDB version (where secrets are simply values with a “secret” type), but this time I can’t access those secrets in Realm functions. I get undefined values whenever I use the expression above. This is even weirder because in the Realm UI, those new secrets look the same as the old secrets —there is nothing that could explain why the old one are working and the new ones aren’t.

According to the doc here:

If you need to access the Secret from a Function or Rule, you can link the Secret to a Value.

What does this mean? How to do that in the new Values system?

[Pinging this post cause I’m still looking for an answer]

Still looking for an answer… Can’t use Secrets, it’s a shame

Step 1: In Mongo console, create a “secret”.
Step 2: In Mongo console, create a “value”, and choose “link” to that “secret”.
Step 3: In your function, use ‘context.values.get’ to get the “value”, which in turn gets the “secret”.