aws-amplify / aws-amplify/amplify-ui

FR (Authenticator): Graceful handling of error message triggered by PreSignup lambda in both react-native and react app

Open
#4,960 10 comments 0 reactions 0 assignees View on GitHub
Authenticator feature-request React React Native
Dominant language
TypeScript
Stars
1.1k
Forks
347
Avg merge
18h 29m
Merged PRs (30d)
9

Description

### On which framework/platform would you like to see this feature implemented?

React, React Native

### Which UI component is this feature-request for?

Authenticator

### Please describe your feature-request in detail.

Currently, I have a PreSignup lambda trigger that is used to verify that an existing account in cognito with the same email address does not already exist from a user that has been signing using different federated signin method. THis is to avoid creation of multiple account for same user, one per signin method. So the in PreSignup is just throwing an error with a message like "An account with this email already exists. Please use "Sign In with ${JSON.parse(providerName[0].providerName}" or Please "Sign In" using your email and password" if we detect that the existing account is a native cognito account.

However, and error thrown from the PreSignup lambda is displayed to the user in a very ugly, programmer style way. And depending on the various use case (federated signin, user/password), react-native federated, vs user password), the display of this error message is different and ugly in almost all cases. I did not find a way to hook it and make the UI user friendly. Therefore this feature request. Ether handle the error in the Hosted UI cleanly, or/and pass it somehow so we can drive our own UI when receiving it

### Please describe a solution you'd like.

Ether handle the error in the Hosted UI cleanly, or/and pass it somehow so we can drive our own UI when receiving it

### We love contributors! Is this something you'd be interested in working on?

- [ ] 👋 I may be able to implement this feature request.
- [ ] ⚠️ This feature might incur a breaking change.

Contributor guide

Open the contributing guide

Research direction

The named entry points are the Authenticator in React and React Native, the Hosted UI, and the PreSignup lambda error. Start by tracing how that error is surfaced in each sign-in path and compare the resulting user-facing behavior. Done means the error is handled cleanly in the Hosted UI and/or exposed so the application can drive its own UI for the described federated and email/password cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, react, react-native, typescript
Domain
authentication, frontend, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.