A mock OIDC server for local development, without running one

Give your app a real OpenID Connect provider to sign in against while you build it, without adding an identity server to your Docker Compose file. Your app gets properly signed tokens for test users you configure.

The problem

An app that signs users in needs an identity provider before you can run it locally. The production provider is often out of reach: you can't create test users, assign roles or register a localhost callback without asking someone. The usual workaround is to run a mock OIDC server or a full identity server in a container. That container then needs a realm or seed file, has to start before your app in every developer's setup and in CI, and has to be kept up to date.

Why HeyIdentity fits

Set it up

  1. Sign up with your email. Your tenant comes with a test user and a client.
  2. In the editor, open the client and add your local callback URL, for example http://localhost:5000/signin-oidc for ASP.NET Core or http://localhost:3000/callback for a SPA.
  3. Copy the authority from Connect your app. It has this shape:
    https://app.heyidentity.dev/t/{tenantRouteId}/c/{configurationId}
    https://app.heyidentity.dev/t/{tenantRouteId}/c/{configurationId}/.well-known/openid-configuration
  4. Put the authority, client ID and (for a confidential client) the development secret into your local settings, in place of the container's URL:
    // appsettings.Development.json
    {
      "Oidc": {
        "Authority": "https://app.heyidentity.dev/t/{tenantRouteId}/c/{configurationId}",
        "ClientId": "my-app",
        "ClientSecret": "my-app-dev-secret"
      }
    }
  5. Add a user for each role you want to try under Users. The role-based authorization guide shows how.

Full examples for ASP.NET Core, oidc-client-ts and openid-client are in the integration reference.

Verify it

  1. Run Test sign-in on the client in the editor to see the tokens and claims before you start your app.
  2. Start your app, sign in, and choose a test user on the HeyIdentity page. Your app should receive the callback and show the user's name and roles.
  3. Sign in as another user and confirm that what your app allows changes with the user's roles.

Compared with running your own

Self-hosted tools are a good choice in some setups. Pick the one that matches how you test.

Limitations

Point your app at a provider you don't run

Sign up to get a tenant with a test user and a client ready to use.

Sign up Try a sign-in in the demo