fix: add api_key field to provider schema for inline key setup#57
Merged
Conversation
The provider creation form only collected api_key_env (the env var name) but not the actual key value. New providers were always created as "unconfigured" because no key was stored. Add an optional secret api_key field so the dashboard can pass the key value during creation. The backend strips it from the TOML and saves it to secrets.env instead.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
6 tasks
houko
added a commit
to librefang/librefang
that referenced
this pull request
Apr 15, 2026
…ton for all providers 1. Backend: extract optional api_key from provider creation request body, save it to secrets.env and set the env var before detect_auth() so the provider is immediately configured. The key value is stripped from the TOML file. 2. Frontend: show "Remove Key" button on all configured provider cards (not just custom ones). The delete action only removes the API key so it is safe for built-in providers. Custom providers show "Delete", built-in ones show "Remove Key" with distinct confirmation wording. 3. Frontend: auto-switch to "configured" tab after creating a provider so the user sees it immediately. Companion PR: librefang/librefang-registry#57
7 tasks
houko
added a commit
to librefang/librefang
that referenced
this pull request
Apr 15, 2026
…ton for all providers (#2540) * fix(dashboard): save API key on provider creation and show remove button for all providers 1. Backend: extract optional api_key from provider creation request body, save it to secrets.env and set the env var before detect_auth() so the provider is immediately configured. The key value is stripped from the TOML file. 2. Frontend: show "Remove Key" button on all configured provider cards (not just custom ones). The delete action only removes the API key so it is safe for built-in providers. Custom providers show "Delete", built-in ones show "Remove Key" with distinct confirmation wording. 3. Frontend: auto-switch to "configured" tab after creating a provider so the user sees it immediately. Companion PR: librefang/librefang-registry#57 * fix(runtime): remove orphaned doc comment causing empty_line_after_doc_comments lint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
api_keyfield (markedsecret = true) to the provider schema so the dashboard creation form can accept the actual API key value during provider setupsecrets.envinstead, so the provider is immediately configured after creationContext
Previously, creating a custom provider via the dashboard only collected
api_key_env(the environment variable name) but not the actual key value. The provider was always created as "unconfigured" and the user had to separately open the config modal to enter the key.Test plan