- Newest
- Most votes
- Most comments
You are correct that there is a difference in behavior between Cognito's Managed Login and the Hosted UI (Classic) when it comes to supporting the login_hint parameter.
For the Managed Login experience, while the login_hint parameter is supported, it does not automatically populate the username field as it does in the Hosted UI (Classic). Instead, when you submit a login_hint parameter to the oauth2/authorize endpoint without specifying idp_identifier or identity_provider parameters, the Managed Login will fill the username field with your hint value. However, this may not be immediately visible on the initial login page.
The Hosted UI (Classic), as you've observed, does visibly pre-populate the username field with the provided login_hint value.
Unfortunately, there isn't a direct solution to make the Managed Login behave exactly like the Hosted UI (Classic) in this regard. The Managed Login UI provides a standardized authentication experience with limited customization options, and modifying its behavior to display the login_hint value immediately is not currently possible.
If pre-populating the username field is crucial for your application, you have a few options:
- Continue using the Hosted UI (Classic) if it meets your other requirements.
- Implement a custom authentication UI where you have full control over the login experience, including how login hints are handled.
- Use the Amazon Cognito API directly to manage the authentication flow, which would allow you to handle login hints in a way that suits your needs.
It's worth noting that Amazon Web Services regularly updates its services, so it's possible that future enhancements to the Managed Login experience might address this limitation. Keep an eye on AWS documentation and announcements for any updates related to this functionality.
Sources
Displaying error message in Cognito managed login sign-in page | AWS re:Post
The redirect and authorization endpoint - Amazon Cognito
Relevant content
asked a year ago
asked a year ago
