This guide refers to using SSO to authenticate access to your endpoints. You cannot use these instructions to set up SSO for logging into your ngrok account in the dashboard.
- Restrict access to ngrok endpoints only to users authenticated via Auth0
- Use Auth0 security policies and multi-factor authentication (MFA) authenticators
- Use Auth0’s Dashboard to facilitate access to ngrok apps
What you’ll need
- An Auth0 account with administrative rights to create apps.
- An ngrok Pay-as-you-go account with an authtoken or admin access to configure endpoints with OpenID Connect.
1. Configure Auth0
In the Auth0 Dashboard, create an application that uses OpenID Connect and supports a client secret (a Regular Web Application). For the full steps, follow Auth0’s Create Applications guide. While configuring the application, set these ngrok-specific values:- Allowed Callback URLs:
https://idp.ngrok.com/oauth2/callback - Application Login URI: the ngrok endpoint URL that exposes your application (for example,
https://myexample.ngrok.app).
2. Configure ngrok
Secure your endpoint with the OpenID Connect Traffic Policy action.This step assumes you have an app running locally (for example, on
localhost:3000) with the ngrok agent installed.policy.yaml file with the following content, replacing the placeholder values with those copied from Auth0:
https://auth0-sso-test.ngrok.app).
3. Test the integration
- In your browser, open an incognito window.
- Access your ngrok endpoint (for example,
https://auth0-sso-test.ngrok.appor using the copied endpoint URL). - When prompted, log in with your Auth0 credentials.
- After you log in, you see your web app.