-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Enable secret manager integrations. #13128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This seperates the logic that scans the environment for secrets from the logic that applies those secrets to the config. This will allow frameworks / plugins to process any secrets found. As an example, using [Cloudflare Secrets Store](https://developers.cloudflare.com/secrets-store/), a framework implementor could use the `collectEnvSecrets` function to scan for secrets relevant to the provider (using the same naming convention used for `string` secrets), and then `await` the `secret.get()` callback before calling `applyEnvSecrets`. The behavior used by the default implementation `setEnvDefaults` should be completely unchanged.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@jamestalmage is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
I think there is an opportunity for an entire new category of secret-manager plugins here. One potential pitfall: API's like cloudflare's secret manager are async, and the current config initialization code is synchronous... So there would be some significant refactoring required to make it work (and do so without breaking 3rd party integrations expecting it to still be synchronous). |
Copying my comment from the discussion on
|
This seperates the logic that scans the environment for secrets from the logic that applies those secrets to the config. This will allow frameworks / plugins to process any secrets found.
As an example, using Cloudflare Secrets Store, a framework implementor could use the
collectEnvSecrets
function to scan for secrets relevant to the provider (using the same naming convention used forstring
secrets), and thenawait
thesecret.get()
callback before callingapplyEnvSecrets
.The behavior used by the default implementation
setEnvDefaults
should be completely unchanged.☕️ Reasoning
🧢 Checklist
🎫 Affected issues
📌 Resources