-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update sample to work with Heroku #2
Open
joelfranusic-okta
wants to merge
2
commits into
mcguinness:master
Choose a base branch
from
jpf:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "Okta Node.js OIDC Sample", | ||
"description": "A barebones Node.js app showing how to integrate with Okta via OIDC", | ||
"repository": "https://github.com/jpf/okta-oidc-sample", | ||
"logo": "https://www.okta.com/sites/all/themes/Okta/images/blog/Auras/Okta_Aura_Solid_BrightBlue_40percent.png", | ||
"success_url": "/welcome", | ||
"env": { | ||
"ISSUER": { | ||
"description": "Access Token Issuer URL", | ||
"value": "https://example.oktapreview.com" | ||
}, | ||
"AUDIENCE": { | ||
"description": "Access Token Audience URI", | ||
"value": "ANRZhyDh8HBFN5abN6Rg" | ||
}, | ||
"IDP": { | ||
"description": "Okta ID for the Social IdP", | ||
"value": "0oa4ftg4vzKlWHHEJ0h7" | ||
}, | ||
"AUTHZISSUER": { | ||
"description": "Alternate Authorization URL", | ||
"value": "0oa4ftg4vzKlWHHEJ0h7" | ||
}, | ||
"APITOKEN": { | ||
"description": "Okta Organization SSWS API Token for Social IdP Callbacks", | ||
"required": false, | ||
"value": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | ||
} | ||
}, | ||
"keywords": ["node", "express", "oidc", "okta"] | ||
} |
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,9 @@ | ||
{ | ||
"issuer": "https://example.oktapreview.com", | ||
"audience": "ANRZhyDh8HBFN5abN6Rg", | ||
"apiToken": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", | ||
"authzIssuer": "https://example.oktapreview.com/oauth2/aus8q4gst8vbUGzFp0h7", | ||
"idp": "0oa4ftg4vzKlWHHEJ0h7", | ||
"widgetScopes": ["openid", "email", "profile", "phone", "address", "groups"], | ||
"protectedScope": "api:read" | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
{ | ||
"name": "okta-oidc-sample", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"engines": { | ||
"node": "8.2.x" | ||
}, | ||
"description": "Sample OpenID Connect Web Server", | ||
"private": true, | ||
"main": "server.js", | ||
"scripts": { | ||
"start": "node server.js | bunyan -o short" | ||
"start": "node server.js --config config.json | bunyan -o short" | ||
}, | ||
"author": "Karl McGuinness", | ||
"license": "MIT", | ||
"dependencies": { | ||
"body-parser": "^1.15.0", | ||
"bunyan": "^1.8.12", | ||
"ejs": "^2.5.6", | ||
"express": "^4.15.3", | ||
"express-session": "^1.15.3", | ||
"express-state": "^1.4.0", | ||
"helmet": "^3.8.1", | ||
"morgan": "^1.7.0", | ||
"passport": "https://github.com/mcguinness/passport.git", | ||
"passport-oauth2-jwt-bearer": "https://github.com/mcguinness/passport-oauth2-jwt-bearer.git", | ||
"yargs": "^6.3.0" | ||
"yargs": "^7.1.0" | ||
} | ||
} |
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,8 @@ | ||
(define([], { | ||
orgUrl: '<%- argv.issuer %>', | ||
clientId: '<%- argv.audience %>', | ||
authzIssuer: '<%- argv.authzIssuer %>', | ||
idp: '<%- argv.idp %>', | ||
scopes: <%- JSON.stringify(argv.widgetScopes) %>, | ||
protectedScope: '<%- argv.protectedScope %>' | ||
})); |
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,37 @@ | ||
<!doctype html> | ||
<html lang="en-us"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Final Steps</title> | ||
</head> | ||
<body> | ||
<h1>You're almost done!</h1> | ||
You just need to complete these steps to get this app working with Okta: | ||
<ol> | ||
<li> | ||
In the | ||
<a href="<%= oktaAdminOrg %>/admin/access/api/trusted_origins"> | ||
Trusted Origins section of your Okta organization</a>, | ||
grant | ||
<a href="http://developer.okta.com/docs/api/getting_started/enabling_cors.html"> | ||
CORS access | ||
</a> | ||
to: <code><%= thisAppUrl %></code> | ||
</li> | ||
<li> | ||
Make sure that the | ||
<a href="<%= oktaAdminOrg %>/admin/app/oidc_client/instance/<%= argv.audience %>/#tab-general"> | ||
OpenID Connect Application you created</a> | ||
has the following URLs registered as Login redirect URIs: | ||
<ul> | ||
<li><code><%= thisAppUrl %>/</code></li> | ||
<li><code><%= thisAppUrl %>/oidc</code></li> | ||
<li><code><%= thisAppUrl %>/oidc.html</code></li> | ||
<li><code><%= thisAppUrl %>/widget.html</code></li> | ||
</ul> | ||
</li> | ||
</ol> | ||
</body> | ||
</html> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this be cleaned up by setting the
issuer
to your custom authorization server? I don't see why we need two issuers here.