openanalytics / shinyproxy

ShinyProxy - Open Source Enterprise Deployment for Shiny and data science apps
https://www.shinyproxy.io
Apache License 2.0
525 stars 151 forks source link

Update Auth0 docs to use actions instead of rules #439

Closed AlexH-BoxFish closed 1 year ago

AlexH-BoxFish commented 1 year ago

In November 2024 Auth0 will be discontinuing rules in favour of actions. The docs currently say to create a rule with:

function (user, context, callback) {
  context.idToken['https://shinyproxy.io/shinyproxy_roles'] = user.app_metadata.shinyproxy_roles;
  callback(null, user, context);
}

Which won't work for new Auth0 customers after October this year. Based on their migrate from rules to actions docs this would become a Login / Post Login action:

exports.onExecutePostLogin = async (event, api) => {
  api.idToken.setCustomClaim("https://shinyproxy.io/shinyproxy_roles", user.app_metadata.shinyproxy_roles);
};

Which is working for me.

LEDfan commented 1 year ago

Thanks a lot for reporting this! I have updated the documentation.