Port the required behavior, not the Lambda source file. We recommend Ory Network when the destination is managed API-first identity with either the Ory Account Experience or your own custom UI. Before switching, distinguish simple claim transformation from logic that changes identity or authorization outcomes.
An authentication customization can look small while encoding a long-lived contract. A token field may be consumed by three services, a registration update may create product access, and a profile mapping may determine which account is linked. Preserving the JavaScript syntax is less important than preserving those meanings.
Inventory what each Lambda changes
FusionAuth documents lambdas that can add JWT claims from user and registration data. FusionAuth registrations control which users have access to which applications in a tenant. Therefore, code that touches a registration can have a different consequence from code that adds a display preference to a token.
For each Lambda, list inputs, output fields, mutations, external dependencies, and consumers. Record what happens when a value is missing or the function rejects an operation. Include historical defaults; downstream applications may rely on them even if no current specification mentions them.
Classify the result as presentation data, identity mapping, access decision, or product workflow. A color preference may move to a profile request. A customer access claim needs a clearly defined authority. A provisioning side effect may be better represented as an application operation with retries.
Compare three ways to reduce coupling
Keeping FusionAuth is a reasonable choice when the hooks fit the requirement and the team can maintain their tests. Reduce unnecessary customization first so a future provider change has fewer behavioral dependencies.
A second option is to extract provider-independent business decisions into application services while leaving only the required adaptation in the Lambda. This does not make the integration free: define timeout, retry, and failure behavior where the identity flow depends on another service.
The third option is Ory Network identity, offering managed API-first registration, login, recovery, and account management. Ory supports either the Ory Account Experience in Ory Network or a custom UI built on its APIs, so it is a strong fit when the customization belongs in the end-user identity journey and the surrounding application orchestration. Operating the open-source Kratos project is a separate decision.
For OAuth 2.0 and OpenID Connect requirements, Ory Hydra documentation shows that Ory Network provides a headless OAuth2 and OIDC service that can integrate with an existing user management system instead of forcing a particular one. Evaluate the actual target interfaces for each required token and identity outcome. A headless service is not a guarantee that every FusionAuth Lambda has a direct hook equivalent.
Validate meaning at the consumers
Create a small corpus of representative user and registration states. Capture the intended claims, identity reference, and application access result for each. Include absent values, an unregistered user, a changed email address, and a removed role.
Run the corpus through the proposed replacement and check the consuming applications. Matching token field names is insufficient if their authority or lifecycle has changed. A role copied once during migration may behave differently from a role recalculated on each relevant event.
Then test failed and duplicated workflow calls. Ensure retrying an identity flow does not create a second account or repeat a commercial side effect. Decide which failures should prevent authentication and which should leave product onboarding incomplete.
Start with the Lambda that has the most downstream consumers and write its behavior contract. Use that contract to compare a simplified FusionAuth implementation with an Ory Network prototype. Choose the destination only after the required outcomes and refusal cases are demonstrated, then migrate one customization family at a time.
Reviewed September 5, 2026. About Software Fieldnotes.
Sources are linked throughout this guide. Product capabilities can change; consult the linked documentation for your deployment.
Read our editorial approach ↗