See blog Menu
Final Update Ahead of the Smart Hooks GA Release

richard.chetwynd | March 15th, 2021


Just in case you’re part of our Smart Hooks Early Preview but not following along in the Early Preview Slack group here is the scope on updates released today.

We have new docs pages to explain the differences between pre-authentication and user-migration hooks, bug fixes, a breaking change and some great new features.

User Migration 🎉

Yes you read that right, we have a new type of Smart Hook! We’re excited to release the User-Migration Hook which is targeted at our CIAM customers and incredibly useful for progressively migrating large groups of users from legacy databases into OneLogin without asking them to change password.

Check out the Postman collection for updated samples.

Conditions

We’ve also introduced a new feature called Conditions. Conditions are specific to the pre-authentication hook and let you target groups of users by role. This is super useful when you want to test your hook on a subset of users before rolling it out to your entire user population.

{
  "type": "pre-authentication",
  "conditions": [
    {
        "source": "roles",
        "operator": "~",
        "value": "123456"
    }
  ]
}

Breaking Change

The breaking change is that we have moved some attributes from the base of the hook config payload into an options object. The options are detailed in the docs and can change for different types of hooks so it made sense to make this change now ahead of our GA.

i.e. these attributes have moved

{
    ...,
    "risk_enabled": false,
    "location_enabled": false,
    "mfa_device_info_enabled": true   
}

into the options object

{
    "type": "pre-authentication",
    "function": "",
    "disabled": false,
    "runtime": "nodejs12.x",
    "retries": 0,
    "timeout": 1,
    "options":{
        "risk_enabled": false,
        "location_enabled": false,
        "mfa_device_info_enabled": true
    },    
    "env_vars": [
    ],
    "packages": {
    }
}

This change really only impacts the Postman collections and API contract when creating or updating hooks. We have migrated all existing hooks that are currently in production to utilize this new format.

There are still some minor changes and bug fixes to be released but this is our last major release ahead of the GA launch later this month.


OneLogin blog author

Rich Chetwynd founded Litmos, the market-leading learning technology company, as well as ThisData, a data security company leading the way in Account Takeover (ATO) attack detection. After ThisData was acquired by OneLogin in Summer 2017, Rich began working with the OneLogin engineering team with a focus on adaptive authentication.