Devvit Secret shadows Devvit Setting even after being deleted.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- developer-experience
Research direction
Start by reproducing the issue with the two Devvit.addSettings definitions and the ctx.settings.get("Gemini-API-Key") call, changing the setting from an app-scoped secret to an installation-scoped setting. Trace how settings and secret storage are resolved; done means the installation value is returned after the secret is removed, or a documented CLI deletion path is provided.
Written by the indexing model from the issue text.
Description
I encountered an issue with Devvit Setting / Secret Storage. When I was developing app I added a secret to my devvit app.
Devvit.addSettings([
{
name: "Gemini-API-Key",
label: "Gemini API Key",
type: "string",
scope: "app",
helpText: "Enter your Gemini API Key here",
isSecret: true
},
]);
Later I ended up changing my mind and made it per install app because I thought it would be better if ever user brought their own api instead of using mine.
Devvit.addSettings([
{
name: "Gemini-API-Key",
label: "Gemini API Key",
type: "string",
scope: "installation",
helpText: "Enter your Gemini API Key here",
},
]);
But with this change when I grab the key using the
const apiKey = (await ctx.settings.get("Gemini-API-Key")) as string;
It still grabs the old secret that I set instead of the new value from app setting page. So even when I stopped using the secret, the secret still somehow exist in the Devvit system.
Devvit needs to automatically clear secrets if they are not being referred in the code and free up its namespace. Or at least provide a cmd in devvit cli to delete all secret storage for an app.
- Dominant language
- TypeScript
- Stars
- 210
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reddit/devvit
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ontola/atomic-server#1625 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·