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
- It's hosted. There's no container, server or realm export to maintain, and the same authority URL works from your laptop, from CI and from a deployed preview environment.
- It's a standards-based OpenID Connect provider with discovery, Authorization Code with PKCE, refresh tokens, userinfo and sign-out, so your app uses its normal OIDC library and validates tokens as usual.
- Users are a fixed list you configure. You sign in by clicking a user, with no passwords and no MFA, and each user carries the roles and claims you give it.
- Token shape is configurable, so roles and scopes can arrive where your production provider puts them. For Microsoft.Identity.Web and MSAL, the Microsoft profile serves Entra ID-compatible endpoints.
Set it up
- Sign up with your email. Your tenant comes with a test user and a client.
- In the editor, open the client and add your local callback URL, for example
http://localhost:5000/signin-oidcfor ASP.NET Core orhttp://localhost:3000/callbackfor a SPA. - 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 - 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" } } - 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
- Run Test sign-in on the client in the editor to see the tokens and claims before you start your app.
- 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.
- 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.
- Keycloak is a full open-source identity server that you run yourself. Choose it when you need a real identity server locally: password login, user federation, admin APIs, or the same server you run in production.
- mock-oauth2-server is an open-source mock that runs as a container or inside your test process. Choose it when tests must run offline or in an air-gapped network, when each test needs tokens with arbitrary contents, or when you want no usage limits at all.
- HeyIdentity fits when you'd rather not run anything, want the same provider in local development, CI and preview environments, want test users and roles that the whole team sees and edits in one place, or test an app built on Microsoft.Identity.Web or MSAL.
Limitations
- Your app and browser need network access to
app.heyidentity.dev. It doesn't work offline. - Usage limits apply per tenant and plan. See the limits reference.
- Users are a fixed list you configure. There's no password login, user registration or directory federation.
- For development and testing only. Never use HeyIdentity to protect production identities.
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.