Refactor RequiredActionAlias
Closed this issue · 3 comments
apellizzn commented
We have the enum RequiredActionAlias defined as follow
export declare enum RequiredActionAlias {
VERIFY_EMAIL = "VERIFY_EMAIL",
UPDATE_PROFILE = "UPDATE_PROFILE",
CONFIGURE_TOTP = "CONFIGURE_TOTP",
UPDATE_PASSWORD = "UPDATE_PASSWORD",
terms_and_conditions = "terms_and_conditions"
}
Since on Keycloack we have the ability to create our own custom required actions using SPI I feel this enum should be more generic otherwise we are gonna have typing issues.
What about something like this?
export declare enum StandardRequiredActionAlias {
VERIFY_EMAIL = "VERIFY_EMAIL",
UPDATE_PROFILE = "UPDATE_PROFILE",
CONFIGURE_TOTP = "CONFIGURE_TOTP",
UPDATE_PASSWORD = "UPDATE_PASSWORD",
terms_and_conditions = "terms_and_conditions"
}
export declare type RequiredActionAlias = StandardRequiredActionAlias | string
This will allow us to do
client.users.executeActionsEmail({
id: "123"
actions: ["INVITE_USER", StandardRequiredActionAlias.CONFIGURE_TOTP]
})
}
Threnklyn commented
I have exactly this use case. Is there any way to send a custom requiredAction without building a post request on my own?
christianramcke commented
We need this too. Is there any plan to make the RequiredActionAlias extendable?
thanks
Threnklyn commented
As a workaround use "YOUR_ACTION" as RequiredActionAlias