-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add deploy to heroku button to the repo
OKTA-429490 <<<Jenkins Check-In of Tested SHA: afb39e1 for [email protected]>>> Artifact: samples-js-react Files changed count: 21 PR Link: "#225"
- Loading branch information
1 parent
ccc0313
commit f0888f6
Showing
21 changed files
with
2,818 additions
and
5,187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
build2 | ||
build | ||
node_modules | ||
dist | ||
npm-debug.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "React Sample Applications for Okta", | ||
"description": "Sample applications that demonstrate various Okta use-cases in your React application.", | ||
"repository": "https://github.com/okta/samples-js-react", | ||
"keywords": ["oidc", "identity", "security", "authentication"], | ||
"success_url": "/", | ||
"env": { | ||
"ISSUER": { | ||
"description": "Issuer URL for your org", | ||
"value": "https://{yourDomain}/oauth2/default" | ||
}, | ||
"CLIENT_ID": { | ||
"description": "Client ID for your application", | ||
"value": "CLIENT_ID" | ||
}, | ||
"NPM_CONFIG_PRODUCTION": { | ||
"description": "npm config production", | ||
"value": "false" | ||
}, | ||
"OKTA_TESTING_DISABLEHTTPSCHECK": { | ||
"description": "Okta test disable https check", | ||
"value": "false" | ||
}, | ||
"USE_INTERACTION_CODE": { | ||
"description": "Use interaction code flow", | ||
"value": "true" | ||
}, | ||
"YARN_PRODUCTION": { | ||
"description": "Yarn production", | ||
"value": "false" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,6 @@ | |
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>React Sample Applications for Okta</title> | ||
<link rel="shortcut icon" href="/favicon.ico"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" crossorigin="anonymous"> | ||
<style> | ||
body { padding-top: 50px; } | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="ui text container"> | ||
<h1 class="ui large header"><img class="ui large image" src="react.svg" />React Sample Applications for Okta</h1> | ||
<div class="ui divider"></div> | ||
|
||
<p>Congratulations! You've successfully started this application.</p> | ||
<p>Please find the sample that fits your use-case from the table below.</p> | ||
|
||
<table class="ui celled table"> | ||
<thead> | ||
<tr> | ||
<th>Sample</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td data-label="Sample"><a href="/okta-hosted-login">Okta-Hosted Login</a></td> | ||
<td data-label="Description">A React application that will redirect the user to the Okta-Hosted login page of your Org for authentication. The user is redirected back to the React application after authenticating.</td> | ||
</tr> | ||
<tr> | ||
<td data-label="Sample"><a href="/custom-login">Custom Login</a></td> | ||
<td data-label="Description">A React application that uses the Okta Sign-In Widget within the React application to authenticate the user.</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const express = require('express'); | ||
const path = require('path'); | ||
|
||
const app = express(); | ||
const port = process.env.PORT || 8080; | ||
|
||
app.use(express.static('heroku')); | ||
|
||
app.use('/okta-hosted-login', express.static(path.join(__dirname, '..', 'okta-hosted-login/build'))); | ||
|
||
app.use('/custom-login', express.static(path.join(__dirname, '..', 'custom-login/build'))); | ||
|
||
app.use('*', (req, res) => { | ||
if (req.originalUrl.startsWith('/okta-hosted-login')) { | ||
res.sendFile(path.resolve(__dirname, '..', 'okta-hosted-login', 'build', 'index.html')); | ||
} else if (req.originalUrl.startsWith('/custom-login')) { | ||
res.sendFile(path.resolve(__dirname, '..', 'custom-login', 'build', 'index.html')); | ||
} else if (req.originalUrl === '/') { | ||
res.sendFile(path.resolve(__dirname, 'index.html')); | ||
} else { | ||
res.status(404).send('Not Found'); | ||
} | ||
}); | ||
|
||
app.listen(port, () => console.log(`App is live on port ${port}!`)); |
Oops, something went wrong.