Zitadel JWT identity provider for existing sessions

A JWT identity provider lets Zitadel accept a token from a session your application already issued, so users can move over without re-registering. This page covers when it fits, how to configure it, and the trust it requires.

On this page

How a Zitadel JWT identity provider accepts existing sessions

Start here if an application already authenticates users, issues its own JWT, and you want Zitadel to accept that existing session as a login method. This is common during a migration, when users must not be asked to sign in again, or when an embedded app hands off to a hosted login. Zitadel documents JWT identity providers as one of its supported federation options, so the pattern is supported, but it is not a plug-in step. The outcome depends on Zitadel trusting the issuer's signing keys, and that trust decision is the main piece of design work.

The trust boundary is the core of the section. When Zitadel accepts a token from another system, it is accepting that system's claims about who the user is, so anyone who can sign tokens with a trusted key can, in effect, create logins. Before configuration, decide which issuer keys are allowed, how they are rotated and revoked, which audience and expiry checks apply, and whether the token can be replayed. Confirm each of these against the JWT identity provider documentation for the Zitadel version you plan to run, because the header names, key configuration and claim mapping are version-specific. The most recent release referenced for this work is v4.19.5, released 15 October 2026, but you should verify the settings against that exact release before you copy any example.

Plan the rollout around the users the bridge will serve. Map which claims identify the user and how they match existing Zitadel accounts, since a mismatch creates duplicate identities that are hard to unwind later. Test with a small set of accounts in a non-production instance, including expired tokens, tokens from unknown issuers, and tokens with altered claims. Record who owns the issuer's key material on both sides and set a date to remove the bridge once migration finishes, because a temporary trust path that stays in place becomes a permanent exposure.

What you need before connecting a JWT identity provider

A JWT identity provider only works when several pieces are in place before the first login attempt. The cards below cover the Zitadel side, the issuing application, the network path between them, and the ownership decision that shapes where the provider is configured.

A self-hosted Zitadel deployment

Confirm how Zitadel will run before you configure any identity provider. Zitadel documents self-hosting on Linux and macOS binaries, Docker Compose and Kubernetes, and recommends Kubernetes with the official Helm chart for high availability. Choose the option your platform team can operate, and make sure the public domain and TLS termination are settled, because the JWT provider depends on a stable issuer address that Zitadel reaches over HTTPS.

Self-hosting docs

A supported PostgreSQL database

Zitadel stores its data in PostgreSQL, and versions 14 through 18 are supported. Confirm that the version you plan to run is in that range, that the database is reachable from every Zitadel pod or process, and that backups cover it. Changing the database later is not a casual step, so check the version and the hosting model with your database team before the first install.

Database docs

An administrator with the right scope

Name the person or service account that will create the JWT provider, and confirm whether that account needs rights at the instance level or only within one organization. Provider settings made at instance level apply across tenants, while organization-level settings stay with that customer. Write down who holds that role, how the account is protected, and who approves changes to it.

Signing keys and token format from the issuing application

The application that already issues sessions must publish the signing algorithm, the key or key set Zitadel will use to verify tokens, and the exact claim names it puts in the JWT, such as subject, email and expiry. Ask the application owner for a sample token and the public key material. Without these details, you cannot set the header and key options correctly or confirm that Zitadel will reject tokens it should not trust.

Network reachability between components

Zitadel must reach the endpoints it uses to fetch keys or validate issuers, and the login flow must reach Zitadel from the user's browser or the embedded app. Map each hop, including reverse proxies, ingress controllers, firewall rules and any internal DNS names. Test from the same network segment that production traffic uses, since a route that works from a laptop may fail inside the cluster.

An owner for the provider decision

Decide which organization will own the JWT identity provider before anyone creates it. Placing it at instance level makes it available to every organization, while placing it on one organization limits trust to that customer or business unit. Record the owner, the review process for trust changes, and who can disable the provider if the issuing application is compromised.

When a JWT identity provider fits and when another method is better

A JWT identity provider fits when users still sign in through a legacy application and you want them to move to Zitadel without a password reset or a one-time cutover. The legacy app keeps issuing its own tokens while Zitadel accepts them as a login method, so Zitadel can create or link the user on first use. What the method preserves is the user's existing session trust and the identifiers the legacy app already uses. What it leaves to the legacy issuer is authentication itself: whether the user is valid, whether the token is current, and how it was revoked.

  • Token trust: Zitadel can only check what the issuer signs, so the issuer's signing keys and token contents define your security boundary.
  • Claim mapping: Identifiers, email and roles must be mapped consistently, or duplicate users appear during the transition.
  • Exit date: Plan when the legacy issuer is retired, because a JWT bridge that outlives it becomes an unowned trust path.
  • Ownership: Your team keeps the mapping rules, key rotation and the decommissioning work after cutover.

Before committing, confirm with your security team which issuer keys are in use and how long legacy sessions remain valid, and compare this route with the migration guides Zitadel publishes for the source system.

How the JWT login flow moves between the app, Zitadel and the user

The flow starts when the user opens the login page in Zitadel and chooses the JWT provider. The existing application issues a signed JWT for that session, and the browser hands it to Zitadel. Zitadel checks the signature and claims against the trust configured for the provider, then matches the user inside the organization or creates one, and finally issues its own tokens to the client. The trust boundary sits at the application's signing key, so teams should confirm who holds that key and how it rotates.

Sequence of the JWT login, with the signing key trust boundary between the app and Zitadel.

How to configure the JWT identity provider step by step

This sequence takes a team from an existing application session to a tested JWT login method in Zitadel, with each step closed by a check that confirms the provider works before the next one begins.

  1. Confirm the trust model and token contract

    Before touching Zitadel, the platform owner and the team that runs the existing application agree on the issuer string, the audience, the signing algorithm, the header or cookie that carries the token, and the claims that identify a user. Record these in a short contract that both teams sign off. The step is done when someone outside the project can read the contract and say which key signs the tokens, how long they live, and who can rotate the key. Confirm each item against the current Zitadel documentation for the JWT identity provider, since option names and accepted locations can change between releases.

  2. Create the JWT provider at the chosen scope

    A Zitadel administrator creates the JWT identity provider either at instance level, so every organization can offer it, or at organization level, so only one customer or business unit sees it. Choose the scope first, because moving a provider later means recreating it and re-linking users. Enter a clear provider name that reflects the source application. The step closes when the provider appears in the console list with the expected scope and its status shows it is enabled for the chosen organization.

  3. Set the issuer, token location and key material

    In the provider settings, the administrator enters the issuer that must match the iss claim of the incoming tokens, then sets the header name or cookie name where Zitadel reads the token. Key material is supplied either as a public key uploaded directly or as a key endpoint that Zitadel fetches, following the option that the documentation describes for your Zitadel version. Use only the public verification key, never a signing secret. The step closes when a token issued by the existing application for a test user is accepted by the provider configuration form without a validation error.

  4. Define the claim mapping and account behavior

    The administrator maps the claims in the token to Zitadel user fields, typically the subject for the external user ID plus email and name, and decides whether an unknown user is created automatically on first login or must be linked to an existing account. Linking requires a verified match on an attribute both systems trust, so document which claim drives the match. Ask the application owner which claims are stable and which change. The step closes with a mapping table that lists each source claim, its target field and the behavior for new and returning users.

  5. Add the provider to the login policy

    A Zitadel administrator adds the JWT provider to the login policy of the instance or organization so it appears as a login option. Keep the password and passkey options available unless the team has decided otherwise, because the JWT method depends on the source session staying valid. The step closes when the login page for the chosen organization shows the new option and the policy view lists it among the allowed providers.

  6. Test with one account and decode the token

    Pick a single test account that already has a session in the existing application. Start a login in Zitadel, select the JWT provider, and complete the flow, then confirm that the expected user is created or linked. Capture the token the application sends and decode it in a development tool to compare the claims against the mapping table, checking the issuer, audience, expiry and subject. The step closes when the test login succeeds, the Zitadel user shows the external identity link, and the decoded claims match what the mapping expects. Repeat with an expired and a tampered token to confirm rejection.

  7. Record the trust boundary and ownership

    The team writes down who owns the signing key, how rotation is coordinated between the source application and Zitadel, what happens when the source session ends, and which logs show accepted and rejected JWT logins. These records feed the security review and the migration plan. The step closes when the runbook names an owner for each item and the rotation procedure has been rehearsed once on the test organization.

Which JWT claims map to Zitadel user fields

This table compares the common claims a source application may place in its session JWT with the Zitadel user field or organization placement each one feeds. Read the required column first, since a missing subject or email will block or complicate account creation and linking. Confirm every claim name with the issuing application and the Zitadel JWT IdP documentation before mapping.

ClaimZitadel targetRequired from sourceNotes
sub (subject)External user ID used to link the accountYesMust be stable and unique per user in the source system so repeat logins resolve to the same Zitadel user.
emailUser email addressYes in most setupsDrives account matching and linking. Treat a changed or reused email as a risk to confirm with the source team.
email_verifiedEmail verified flagRecommendedOnly trust verified state if the source application verifies addresses. Otherwise, confirm how Zitadel handles unverified emails.
given_nameFirst name in the user profileOptionalPrefills the profile. Confirm whether the source sends it on every token or only at first login.
family_nameLast name in the user profileOptionalSame handling as the first name. Missing values should not block login, so test that case explicitly.
Organization or tenant identifierOrganization the user lands inDepends on designNeeds a deliberate mapping to a Zitadel organization. Confirm the exact claim name and how the JWT IdP routes users with it.
Custom claims (for example roles)Actions or role assignment after loginOptionalCustom claims do not map to user fields by default. Confirm the supported mechanism in the Zitadel documentation before relying on them.

Trust boundaries and key handling for JWT logins

A JWT identity provider makes Zitadel trust assertions signed by another system, so the trust boundary sits in the keys, claims and session lifetime you accept. The cards below cover the controls to decide and verify before the provider accepts any user, and the cleanup that follows once migration ends.

Signing key trust and rotation

Zitadel verifies the JWT signature against keys you register from the existing application's issuer. Only the signing keys of that issuer should be trusted, and each key should have a named owner. Confirm how the existing application publishes and rotates its keys, whether it supports overlapping keys during rotation, and who is notified when a key is retired. A key that was never removed from the provider configuration remains a live login path.

Issuer, audience and expiry checks

Validation of the issuer, audience and expiry claims is what stops a token minted for another system from logging a user in. Set the expected issuer and audience exactly, and confirm the source application includes an expiry claim on every token. Test with tokens that have a wrong issuer, a wrong audience and an expired timestamp, and record that each one is rejected.

Token lifetime and replay window

A bearer JWT that is copied or intercepted can be replayed until it expires, so its lifetime defines the replay window. Ask the existing application team for the maximum token age it issues and shorten it where possible before migration. Confirm whether the source issues one-time or single-use tokens, and whether Zitadel is expected to accept each token only once. Document the chosen window so security reviewers can see it.

Restricting the provider to one organization

A JWT provider configured at instance level can be offered to every organization in the instance, which widens the set of users who can sign in through it. Attach the provider to the single organization that holds the migrating users, and confirm that other organizations do not show it on their login page. Re-check this scoping after any change to organization login policies.

Audit logging of JWT logins

Each login through the JWT provider should be traceable to the source system that issued the token, the user and the time. Confirm that Zitadel audit events for external logins are forwarded to your log platform, and that retention matches your audit policy. Write a test case that proves a JWT login appears in the log with the provider identity, so an investigator can tell it apart from password or passkey logins.

Removing the provider after migration

A JWT provider left in place after migration keeps a trust path to the old session system alive, often long after its keys are unmaintained. Set a removal date in the migration plan, confirm which users have completed a first login that links them to local credentials, and remove the provider and its keys from Zitadel. Then revoke the old issuer's signing keys and confirm the removal in the audit log.

Migration guides

Why JWT logins fail and how to fix them

This table lists the failures teams most often hit when they accept a JWT from an existing session as a Zitadel login method, with the likely cause and first fix for each. Use it as a triage sheet, then confirm exact setting names and behavior against the documentation for your Zitadel version before changing production configuration.

SymptomLikely causeFirst fix to try
Signature validation fails after key rotationThe issuing application rotated its signing key, but Zitadel still trusts the old public key or cannot fetch the new oneConfirm the JWT IdP key source is current, publish the new key before switching signers, and keep old and new keys valid for an overlap period
Token is missing from the expected headerThe calling application sends the JWT in a different header, prefix or cookie than the one Zitadel is configured to readCompare the header name and any prefix in the JWT IdP settings with what the application actually sends, and test with a captured request
Clock skew makes tokens look expiredThe issuing and Zitadel servers disagree on time, so expiry or not-before checks fail near token boundariesSynchronize both systems with NTP, check the accepted skew setting in your version's documentation, and keep token lifetimes short
Audience or issuer does not matchThe token's aud or iss claim differs from the values configured in the JWT IdP, often after a domain or environment changeAlign the issuer string and audience exactly, including trailing slashes and hostnames, across the issuing app and Zitadel configuration
No user can be matched because claims are absentThe token lacks the claim Zitadel uses to identify the user, or the claim name differs from the configured mappingList the claims in a sample token, map the identifier and email claims explicitly, and confirm which claims your version requires
Duplicate accounts appear after linkingUsers first created by another login method were not linked, or the matching attribute differs between sources, such as email case or an aliasChoose one matching attribute, normalize it, link existing accounts before go-live, and review the account linking design for the instance
Provider is available at the wrong scopeThe JWT IdP was created at instance level when it should be on one organization, or the reverse, so users see it or miss itCheck where the provider was created, move the setting to the intended scope, and confirm which organizations can offer it at login

What buyers ask before hiring help with a JWT identity provider

What drives the effort of a JWT identity provider setup in Zitadel?

The effort follows the number of applications that issue tokens, the quality of the claims those tokens carry, how signing keys are managed, and how many existing users must be moved or linked. Each issuing application needs its own trust configuration, header and key settings, and test cases, so more applications mean more work. Claim quality matters because Zitadel needs stable identifiers and email addresses to link users correctly. Key management adds work when keys are rotated by several teams or stored in systems you have not yet mapped. Ask any provider to break the quote down by these four drivers, and to state which of them they have assumed.

How long does a JWT identity provider project take?

Duration depends on the scope you agree in writing and on how much access the team has to the application that issues the session tokens. If that application's team can change its token format and publish signing keys quickly, the trust setup and testing move faster. If the issuing system is owned by another vendor or team with long change cycles, most of the calendar time goes to waiting on them. No duration figure is supplied for this topic, so ask for a timeline tied to named milestones: trust configuration, test logins, linking existing users, and a cutover window. Confirm which of those steps the quote includes.

What does the client need to provide for this work?

The engagement needs access to the source system that issues the existing session JWTs, the names of the people who own its signing keys, and a set of test accounts that cover your main user types. Without the issuer's configuration and a sample of real token payloads with sensitive values removed, the claim mapping cannot be designed. Key owners must confirm how keys are published, rotated and revoked, because Zitadel must trust the right keys. Test accounts in a non-production environment let the team verify login, account linking and failure handling before any user reaches the new flow. Ask the provider to list these inputs in the quote with a named owner for each.

Can our team set up a JWT identity provider in Zitadel without outside help?

A capable identity or platform team can do it alone if it has administrator access to a self-hosted Zitadel instance, access to the issuing application, and time to test edge cases. The hard parts are rarely the console steps. They are deciding which claims are trustworthy, handling expired or revoked tokens, and proving that linked accounts cannot be taken over by someone who presents a valid-looking token. Outside help is most useful when several applications must trust Zitadel at once or when a migration must move many users without duplicates. Decide by listing your team's experience with OIDC trust, key rotation and identity testing, then compare that list with the scope.

What ownership does a JWT identity provider need after go-live?

After go-live someone must own the trust relationship, the signing key lifecycle, the claim mapping and the runbook for failures. Zitadel itself also needs its own operations, including upgrades, which are covered by the self-hosting releases your team tracks. Key rotation on the issuing side must be coordinated with Zitadel's trust configuration, or logins will fail without a clear cause. Ongoing support can be handled by your team, by a retainer, or by a mix, and that choice should appear in the written scope. Ask any provider which of these tasks is recurring, who runs it, and how changes to the issuer are tested before they reach production.

What security risks should the scope cover for a JWT identity provider?

The main risk is trusting a token that the issuer did not intend to grant for login, such as a token from a different application, audience or environment. The scope should cover audience and issuer checks, key trust limited to the right keys, handling of token lifetimes, and the path for account linking so that one user cannot claim another user's identity. Test cases should include expired tokens, tampered claims and tokens signed by an unexpected key. Ask the provider to state how each risk is tested and what evidence the report will contain, and confirm that the final configuration is reviewed by the team that owns the issuer.

How does a JWT identity provider affect a migration from an existing login system?

A JWT identity provider can let users keep signing in through your current application while Zitadel becomes the place where their identity lives. That approach suits migrations where the number of users is large and a single cutover is risky, because accounts can be linked as each user signs in. The scope should state how unlinked users are handled, whether any bulk export is in scope, and what happens to users who never return. Ask for the migration volume and the expected linking rules in the quote, since these set most of the testing effort. Zitadel documents migration approaches such as just-in-time migration, which are described on its migration guides.

How DeployOpen scopes and delivers a Zitadel JWT integration

DeployOpen approaches a Zitadel JWT identity provider as a scoped integration with a defined trust boundary. We agree on the existing session token, its signing keys and claims, and the Zitadel instance or organization that will accept it before any build starts. The work is delivered inside infrastructure you control, with written test evidence and handover documentation for your own team.

How we scope

  • Engagements are fixed-scope, with the JWT IdP scope, deliverables and timeline agreed in writing before work starts.
  • The scope names which applications issue the existing JWT, which Zitadel organization receives it, and which claims must map to users.
  • Scope records the signing algorithm, key source, header name and token lifetime your current session service uses, so each item is confirmed up front.

How we build

  • We configure the JWT identity provider in Zitadel and verify the header and key settings against tokens issued by your session service.
  • Build work covers claim-to-user mapping, handling of tokens that fail validation, and the login flow for the embedded application.
  • We test expired, altered, wrongly signed and replayed tokens, and confirm that the trust boundary matches what the scope defined.

How we hand over

  • You receive configuration records, key rotation steps and a description of the trust relationship between your session service and Zitadel.
  • Documentation explains which party owns each signing key, how keys are rotated and what happens when the session service changes.
  • Test results and the retest record are delivered so your security and compliance teams can review the integration independently.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after the initial handover.
  • Retainers can cover Zitadel version upgrades that affect JWT IdP behavior, with changes reviewed against the agreed scope.
  • Ask any provider to confirm how they test key rotation and session service changes, since these are the most common points of drift.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.