Skip to content

Commit aa24af3

Browse files
authored
Merge pull request #379 from abbaspour/master
added netlify.toml file
2 parents decb8f9 + 7cdb0b5 commit aa24af3

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ If you have found a bug or if you have a feature request, please report them at
3030

3131
[Auth0](https://auth0.com)
3232

33+
## Deploy to Netlify
34+
You can deploy this example as a site on your own to explore and experiment with, by clicking this button.
35+
After deploy, install Auth0 by Okta extension in Netlify and follow the steps to create an App.
36+
37+
<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>
38+
39+
3340
## License
3441

3542
This project is licensed under the MIT license. See the [LICENSE](./LICENSE) file for more info.

Sample-01/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
href="https://cdn.auth0.com/js/auth0-samples-theme/1.0/css/auth0-theme.min.css"
3535
/>
3636

37-
<title>Calling an API</title>
37+
<title>React SDK Sample</title>
3838
</head>
3939
<body class="h-100">
4040
<noscript>You need to enable JavaScript to run this app.</noscript>

netlify.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[build]
2+
base = "Sample-01"
3+
command = """if [ -z "${AUTH0_DOMAIN}" ] || [ -z "${AUTH0_CLIENT_ID}" ]; then
4+
echo "Error: One or both environment variables (AUTH0_DOMAIN, AUTH0_CLIENT_ID) are not set or are empty."
5+
exit 1
6+
fi
7+
printf '{\"domain\":\"%s\", \"clientId\":\"%s\"}' "${AUTH0_DOMAIN}" "${AUTH0_CLIENT_ID}" > src/auth_config.json
8+
yarn install
9+
yarn run build
10+
"""
11+
publish = "build"

0 commit comments

Comments
 (0)