The fix for
OPENAM-16338 provides the ability to set a gotoFailureLoginUrl so that any login failure of a scripted module can optionally redirect to a pre-defined url.
The following Server side authentication script snippet illustrates how this can be used:
When the scripted module's script has a FAILED authState, the module checks for the sharedState property gotoOnFailureUrl and if present will perform a redirect to that url. Note that for an absolute url, this must also be included in the list of valid redirection urls in the Validation service, otherwise it will be ignored.