observablehq / examples

Examples of using Observable in a variety of contexts
108 stars 33 forks source link

Example of overriding Secret with custom implementation #17

Open tophtucker opened 3 years ago

tophtucker commented 3 years ago

Responding to this forum question. It's a little delicate because we gotta be careful not to encourage anyone to use a Map of hardcoded Secrets client-side — but using Secrets with the Runtime API does seem like an important scenario that merits an example.

I thought about making the example call an API with a token, but don't wanna actually call anything and don't want them to see a broken request. And then I thought about using the Secret to decode a message with a Vigenère cipher, simple enough that decryption could be one cell, but figured that was overthinking it and all people need to see is the value!