-
Notifications
You must be signed in to change notification settings - Fork 174
Description
Checklist
- I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
I am deploying my actions, forms and flows from staging to production but after deployment I have to manually edit my actions in production to reference these newly deployed forms due to the forms having a different form_id from staging to prod. Also any manual editing would be overwritten when you do another deployment with the cli.
Action code:
exports.onExecutePostLogin = async (event, api) => {
api.prompt.render('<form_id>');
};I would love a way where the form_id for forms in actions can be resolved like how flows are done with forms.
Describe the ideal solution
As actions are code files I think the best solution would be to leverage action secrets.
By using actions secrets we could basically create a new secret and set the value of the secret to the form name and during processing of the action (would require to change the order so forms complete before actions) we could retrieve the list of forms to resolve the name to ids to replace the secret value with the form_id
Action Code:
exports.onExecutePostLogin = async (event, api) => {
api.prompt.render(event.secrets.FORM_ID);
};YAML Tenant Config:
actions:
- name: form-action
code: ./actions/form-action/code.js
dependencies: []
deployed: true
runtime: node22
secrets:
- name: FORM_ID
value: 'new-form'
status: built
supported_triggers:
- id: post-login
version: v3
forms:
- name: new-form
body: ./forms/new-form.jsonAlternatives and current workarounds
No current workaround with cli except for manual editing of actions
Additional context
No response