Skip to main content

Amazon OAuth

Configure Login with Amazon

The step-by-step instructions below follow Amazon's documentation on Register for Login with Amazon for websites.

Create a Security Profile for ngrok

  1. Navigate to the Login with Amazon portal, and sign in with your Amazon Developer credentials.

    note

    If you don't have a developer account, you'll need to sign up for a new one.

  2. Click Create a New Security Profile, provide a Name and a Description for your security profile, enter the privacy URL provided by your application (i.e. https://ngrok.com/privacy) in the Consent Privacy Notice URL, and then click Save.

  3. Click Show Client ID and Client Secret to reveal your Client ID and Client Secret values and make a note of both of them.

  4. Hover over the gear icon of the Security Profile you created and then click Web Settings.

  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.

Update your ngrok endpoint traffic policy

  1. Access the ngrok Dashboard Endpoints page 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:
---
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
note

You may add any scopes that are required by your application with the following caveats.

  1. Click Save to validate and update your traffic policy.

Configure access control

Optionally, configure access control to your service by only allowing specific users or domains. For example:

# Only allow access to me@example.com. Add this after your OAuth Action.
---
on_http_request:
- expressions:
- "!(actions.ngrok.oauth.identity.email in ['me@example.com'])"
actions:
- type: deny

Additional application setup information