npm.io
0.1.11 • Published 2 years ago

rules-wrapper

Licence
ISC
Version
0.1.11
Deps
2
Size
22 kB
Vulns
0
Weekly
0

Auth0 Rules Wrapper

const wrapper = require('@auth0/rules-wrapper');

function rule01(u, ctx, cb) { }
function rule02(u, ctx, cb) { }

exports.onExecutePostLogin = async (event, api) => {
    await wrapper.execute([rule01, rule02], {event, api});
}

exports.onContinuePostLogin = async (event, api) => {
    await wrapper.execute([rule01, rule02], {event, api, onContinue: true});
}

Actions based wrapper function to run Rules without any modifications to source code.

Mapping Table

see mapping.md

Compatibility

  • access_token claims
  • access_token scopes
  • id_token claims
  • setting primaryUserId
  • SAML response mapping
  • global object simple
  • pre & post redirect
  • MFA
  • auth0 object user and app metadata for current user
  • auth0 object accessToken
  • configuration object populated from secrets
  • global_client_id

Not supported

Out of scope

  • auth0 object user and app metadata for other users

Todo

  • log level param