From 1b0efe86f3929e360936e5f45d6aed69a33947f5 Mon Sep 17 00:00:00 2001 From: Amin Abbaspour Date: Fri, 15 Nov 2024 11:19:16 +1100 Subject: [PATCH] added netlify.toml --- README.md | 6 ++++++ netlify.toml | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 netlify.toml diff --git a/README.md b/README.md index c7ddaf42..5f60d010 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,12 @@ If you have found a bug or if you have a feature request, please report them at [Auth0](https://auth0.com) +## Deploy to Netlify +You can deploy this example as a site on your own to explore and experiment with, by clicking this button. +After deploy, install Auth0 by Okta extension in Netlify and follow the steps to create an App. + +Deploy to Netlify + ## License This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info. diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..cd910f24 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,11 @@ +[build] + base = "Sample-01" + command = """if [ -z "${AUTH0_DOMAIN}" ] || [ -z "${AUTH0_CLIENT_ID}" ] || [ -z "${AUTH0_AUDIENCE}" ]; then + echo "Error: One or more environment variables (AUTH0_DOMAIN, AUTH0_CLIENT_ID, AUTH0_AUDIENCE) are not set or are empty." + exit 1 + fi + printf '{\"domain\":\"%s\", \"clientId\":\"%s\", \"apiUri\":\"%s\", \"authorizationParams\":{\"audience\":\"%s\"}}' "${AUTH0_DOMAIN}" "${AUTH0_CLIENT_ID}" "${URL}" "${AUTH0_AUDIENCE}"> auth_config.json + npm install + npm run build + """ + publish = "dist/login-demo"