diff --git a/README.md b/README.md index 3ef0bbd7..e8385e1e 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,13 @@ 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/Sample-01/public/index.html b/Sample-01/public/index.html index 4775089a..cd627705 100644 --- a/Sample-01/public/index.html +++ b/Sample-01/public/index.html @@ -34,7 +34,7 @@ href="https://cdn.auth0.com/js/auth0-samples-theme/1.0/css/auth0-theme.min.css" /> - Calling an API + React SDK Sample diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..95997a97 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,11 @@ +[build] + base = "Sample-01" + command = """if [ -z "${AUTH0_DOMAIN}" ] || [ -z "${AUTH0_CLIENT_ID}" ]; then + echo "Error: One or both environment variables (AUTH0_DOMAIN, AUTH0_CLIENT_ID) are not set or are empty." + exit 1 + fi + printf '{\"domain\":\"%s\", \"clientId\":\"%s\"}' "${AUTH0_DOMAIN}" "${AUTH0_CLIENT_ID}" > src/auth_config.json + yarn install + yarn run build + """ + publish = "build"