-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: updating integration guides for oauth
Signed-off-by: Russ Savage <[email protected]>
- Loading branch information
Showing
27 changed files
with
373 additions
and
322 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 |
---|---|---|
|
@@ -2,7 +2,8 @@ | |
description: Authenticate users with Amazon OAuth | ||
--- | ||
|
||
import ConfigExample from "/src/components/ConfigExample.tsx"; | ||
import Amazon from "/traffic-policy/actions/oauth/examples/custom-amazon-example.mdx"; | ||
import Email from "/traffic-policy/actions/oauth/examples/restrict-by-email-example.mdx"; | ||
|
||
# Amazon OAuth | ||
|
||
|
@@ -26,57 +27,18 @@ The step-by-step instructions below follow Amazon's documentation on [Register f | |
5. On the **Security Profile** page, click **Edit**, enter `https://idp.ngrok.com/oauth2/callback` in the **Allowed Return URLs** field, and then click **Save**. | ||
![](/img/howto/oauth/2-amazon-register.png) | ||
|
||
### Update your ngrok endpoint configuration | ||
### Update your ngrok endpoint traffic policy | ||
|
||
1. Access the [ngrok Dashboard Endpoints page](https://dashboard.ngrok.com/endpoints?sortBy=createdAt&orderBy=desc) and locate an existing endpoint you'd like to add this to or create a new one. | ||
2. In your traffic policy, add the following configuration: | ||
|
||
<ConfigExample | ||
snippetText={null} | ||
showLineNumbers={true} | ||
yamlMetastring="{4-10}" | ||
jsonMetastring="{5-15}" | ||
config={{ | ||
on_http_request: [ | ||
{ | ||
actions: [ | ||
{ | ||
type: "oauth", | ||
config: { | ||
provider: "amazon", | ||
client_id: "{your app's OAuth client id}", | ||
client_secret: "{your app's OAuth client secret}", | ||
scopes: ["profile"], | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}} | ||
/> | ||
<Amazon /> | ||
|
||
3. Click **Save** to validate and update your traffic policy. | ||
|
||
4. Optionally, configure access control to your service by only allowing specific users or domains. | ||
|
||
<ConfigExample | ||
snippetText="Only allow access to [email protected]. Add this after your OAuth Action." | ||
showLineNumbers={true} | ||
config={{ | ||
on_http_request: [ | ||
{ | ||
expressions: [ | ||
"!(actions.ngrok.oauth.identity.email in ['[email protected]'])", | ||
], | ||
actions: [ | ||
{ | ||
type: "deny", | ||
}, | ||
], | ||
}, | ||
], | ||
}} | ||
/> | ||
<Email /> | ||
|
||
### Additional application setup information | ||
|
||
|
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
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
Oops, something went wrong.