Customizing Error Messages for FusionAuth Hosted Login Pages with Generic Connectors
-
We’re using FusionAuth’s hosted login pages and considering the use of a generic connector to authenticate users against an external data source.
We’d like to know:
- Is it possible to control what the hosted templates display based on different error scenarios returned by the connector?
- Can we display different templates or pass custom error information from the connector to the hosted login page?
-
At this time, the generic connector in FusionAuth only supports a single error response type:
- The connector returns a 404 Not Found in any failure scenario, whether:
- The user does not exist in the external system, or
- The user exists but provides invalid credentials.
This design is intentional and exists to prevent user enumeration attacks by not revealing which part of the login process failed.
Because of this security restriction:
- You cannot display different error messages on the hosted login page for different connector failure scenarios.
- There’s no way to pass additional custom data or error context from the generic connector to the hosted templates for display purposes.
You can read more details here:
Generic Connector - Response - The connector returns a 404 Not Found in any failure scenario, whether: