Created
December 7, 2021 18:58
-
-
Save joshcanhelp/52a97dec582bff831b9c2243d366801a to your computer and use it in GitHub Desktop.
Step-up authentication in Auth0 using Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.onExecutePostLogin = async (event, api) => { | |
const CLIENTS_NEEDING_MFA = [ | |
"CLIENT_ID_NEEDING_MFA_1", | |
"CLIENT_ID_NEEDING_MFA_2" | |
]; | |
if (!CLIENTS_NEEDING_MFA.includes(event.client.client_id)) { | |
return; | |
} | |
if (event.request.query.acr_values !== "AuthID_MFA_ACR"){ | |
return; | |
} | |
api.multifactor.enable("any", { allowRememberBrowser: false }); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment