HYPR Reconcile
HYPR Reconcile lambda
When an HYPR identity provider is used to complete a federated login request FusionAuth will use the email address to reconcile user. You may optionally utilize a lambda to customize the user and user registration during this authentication event.
When you create a new lambda using the FusionAuth UI we will provide you an empty function for you to implement.
If you are using the API to create the lambda you will need to ensure your function has the following signature:
function reconcile(user, registration) {
// Lambda code goes here
}
This lambda must contain a function named reconcile
that takes three parameters. The parameters that the lambda is passed are:
-
user
- the FusionAuth User object -
registration
- the FusionAuth UserRegistration object
The two FusionAuth objects are well documented here in the User API and Registration API documentation.
Assigning the lambda
Once a lambda is created, you may assign it to the HYPR identity provider in the IdP configuration.
Navigate to
and select your existing HYPR configuration or click and select HYPR if it has not yet been configured.Example lambda
There is not a default HYPR reconcile lambda provided by FusionAuth. The following is an example lambda you can use as a starting point.
// This is an example HYPR reconcile, modify this to your liking.
function reconcile(user, registration) {
console.info('Hello world!');
}
Limitations
The user.email
field on the user will be ignored if modified by the lambda function. This is to protect the integrity of the email
claim returned by the identity provider.
The user.username
field on the user will be ignored if modified by the lambda function. This is to mitigate the risks of an account takeover due to a non globally unique identifier.