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

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 SAML.

1. Create a SAML application in Frontegg and download the IdP metadata

Configure Frontegg as a SAML identity provider by following Frontegg’s guide, Frontegg as IDP via SAML. ngrok generates the service provider (SP) Entity ID and Assertion Consumer Service (ACS) URL from your endpoint URL, which you don’t have yet, so enter temporary values (such as https://temporary) for the entity ID and ACS URL for now. You replace them with the ngrok-generated values in step 3. Download the IdP metadata XML that Frontegg returns. You use it in the next step.

2. Configure ngrok

The SAML Traffic Policy action is currently in developer preview. Request access to configure SAML via Traffic Policy.
Once you have developer preview access, create a policy.yaml file with the following content, replacing YOUR_IDP_METADATA_XML with the IdP metadata XML from Frontegg:
The SAML action generates your ngrok SP Entity ID and ACS URL based on your endpoint URL. Refer to the SAML action documentation for how to retrieve these values to complete your Frontegg configuration. Launch an endpoint with this policy:
Copy the URL next to Forwarding. You use this URL to test the integration.

3. Update the Frontegg SAML configuration

Back in Frontegg, update the SAML configuration you created in step 1, replacing the temporary values with the ngrok values you retrieved from the SAML action documentation:
  • Set the Entity ID to your ngrok SP Entity ID.
  • Set the ACS URL to your ngrok ACS URL.
If your Frontegg environment uses hosted login, also add your ngrok forwarding URL (for example, https://123456789.ngrok.app/) as an allowed login URL. Refer to the same Frontegg guide for where to configure this.

4. Start an endpoint

This step assumes you have an app running locally (for example, on localhost:3000) with the ngrok agent installed.
Run the following command, replacing 3000 with your local web app port and YOUR_DOMAIN with your ngrok domain:
Copy the URL next to Forwarding. You use this URL to test the Frontegg authentication.

5. Grant access to Frontegg users

Frontegg controls who can sign in through the accounts and users you manage in the Frontegg Portal Backoffice. Create an account and add the users who need access to ngrok, then confirm those users are assigned to your environment.

6. Test the integration

  • In your browser, launch 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.