Skip to content

Commit

Permalink
Merge pull request #379 from abbaspour/master
Browse files Browse the repository at this point in the history
added netlify.toml file
  • Loading branch information
arpit-jn authored Dec 18, 2024
2 parents decb8f9 + 7cdb0b5 commit aa24af3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<a href="https://app.netlify.com/start/deploy?repository=https://github.com/auth0-samples/auth0-react-samples"><img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" height=30px></a>


## License

This project is licensed under the MIT license. See the [LICENSE](./LICENSE) file for more info.
2 changes: 1 addition & 1 deletion Sample-01/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
href="https://cdn.auth0.com/js/auth0-samples-theme/1.0/css/auth0-theme.min.css"
/>

<title>Calling an API</title>
<title>React SDK Sample</title>
</head>
<body class="h-100">
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
11 changes: 11 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit aa24af3

Please sign in to comment.