Skip to main content
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.
This guide walks you through configuring Frontegg as the primary Identity Provider (IdP) for ngrok endpoints using single sign-on (SSO). By integrating Frontegg SSO with ngrok, you can:
  • Restrict access to ngrok endpoints only to users authenticated via Frontegg
  • Use Frontegg security policies and multi-factor authentication (MFA) authenticators
  • Use Frontegg’s Dashboard to facilitate access to ngrok apps
The ngrok integration with Frontegg supports service provider-initiated (SP-initiated) SSO. In this mode, users access ngrok endpoints and are redirected to Frontegg for authentication.

What you’ll need

  • A Frontegg 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 Frontegg

In the Frontegg Portal, set up Frontegg’s hosted login to act as an OIDC identity provider for ngrok. For the full steps, follow Frontegg’s Use OIDC guide. While configuring hosted login, set these values so it works with ngrok:
  • Under Authentication > Login method, add https://idp.ngrok.com/oauth2/callback to the Hosted login allowed redirect URLs and save.
  • Under Env settings, copy the Client ID and the API key.
  • On the Domains tab, copy the Domain name.
You use the Client ID, API key, and Domain name to configure ngrok. Make sure the users who need access are added to the environment before you test.

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.
Create a policy.yaml file with the following content, replacing the placeholder values with those copied from Frontegg:
Start an ngrok endpoint with this policy:
Copy the URL next to Forwarding (for example, https://frontegg-sso-test.ngrok.app).

3. Test the integration

  • In your browser, open an incognito window.
  • Access your ngrok endpoint (for example, https://frontegg-sso-test.ngrok.app or using the copied endpoint URL).
  • When prompted, log in with your Frontegg credentials.
  • After you log in, you see your web app.