Security implications of storing OAuth client ID in config.json? #7
-
Hi there, thanks for the great plugin! I'm wondering about whether there are any security implications to storing the client ID in config.json, since I believe this info is accessible to anyone including unauthenticated users via the js source. I know that it's not totally secret info, but I have seen some people saying it's something better kept private, for example on ouath.com they say:
I wonder if it's worth using something like sanity-studio-secrets to store the client ID in the data set instead? I also see that while it isn't documented, the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Thanks for the kind remarks! I've had great ideas when I started working on this plugin but the primary reason why it didn't push through is because of this very concern you're asking me right now. To be honest, I agree that it's better to keep the OAuth Client Id as a secret as possible and not publicly accessible say for example you can read its value from the config file of your Sanity repo when it's set to At the time when I created this, I didn't have much knowledge so why I opted the easiest path which is using the config json file. Knut also suggested the same thing to use As for |
Beta Was this translation helpful? Give feedback.
Thanks for the kind remarks!
I've had great ideas when I started working on this plugin but the primary reason why it didn't push through is because of this very concern you're asking me right now. To be honest, I agree that it's better to keep the OAuth Client Id as a secret as possible and not publicly accessible say for example you can read its value from the config file of your Sanity repo when it's set to
public
. But even then if it's private and we're going to usesanity-studio-secrets
as per your suggestion, you can actually be able to read the value of it given the right endpoint and api parameters via GROQ to query such value if your dataset is topublic
.At the time when I creat…