Skip to content

Commit

Permalink
Don't include secrets during build.
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten-stripe committed Feb 11, 2020
1 parent ea85568 commit 4280643
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/with-stripe-typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ After the successful deploy, Now will show you the URL for your site. Copy that
now secrets rm stripe_webhook_secret
now secrets add stripe_webhook_secret whsec_***

As the secrets are pulled into the application at deploy time, we will need to redeploy our app after we made changes to the secrets. Run `now` again to redeploy with the new secret value.
As the secrets are set as env vars in the project at deploy time, we will need to redeploy our app after we made changes to the secrets. Run `now` again to redeploy with the new secret value.
2 changes: 0 additions & 2 deletions examples/with-stripe-typescript/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ require('dotenv').config()
module.exports = {
env: {
STRIPE_PUBLISHABLE_KEY: process.env.STRIPE_PUBLISHABLE_KEY,
STRIPE_SECRET_KEY: process.env.STRIPE_SECRET_KEY,
STRIPE_WEBHOOK_SECRET: process.env.STRIPE_WEBHOOK_SECRET,
},
}
8 changes: 5 additions & 3 deletions examples/with-stripe-typescript/now.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"env": {
"STRIPE_SECRET_KEY": "@stripe_secret_key",
"STRIPE_WEBHOOK_SECRET": "@stripe_webhook_secret"
},
"build": {
"env": {
"STRIPE_PUBLISHABLE_KEY": "@stripe_publishable_key",
"STRIPE_SECRET_KEY": "@stripe_secret_key",
"STRIPE_WEBHOOK_SECRET": "@stripe_webhook_secret"
"STRIPE_PUBLISHABLE_KEY": "@stripe_publishable_key"
}
}
}
2 changes: 1 addition & 1 deletion examples/with-stripe-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "with-stripe-typescript",
"version": "1.0.0",
"description": "Full-stack TypeScript sample using Next.js, react-stripe-js, and stripe-node.",
"description": "Full-stack TypeScript example using Next.js, react-stripe-js, and stripe-node.",
"scripts": {
"dev": "next",
"build": "next build",
Expand Down

0 comments on commit 4280643

Please sign in to comment.