aws-amplify / aws-amplify/docs
[Feedback] Add example or template for a Lambda Trigger to link existing users
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
**Page**: [`/cli/usage/lambda-triggers`](https://docs.amplify.aws/cli/usage/lambda-triggers)
**Feedback**:
Hi,
I have several sign in methods (Google, Apple, Email + Password) and would like to link user accounts to ensure that a user is not created twice.
From the documentation and various github issues, I understood, that you should use a pre-signup trigger to handle these kind of situations but I could not find any template or best practice from AWS even though this seems to me like a pretty standard use case.
Therefore I would appreciate if you could add something related to your documentation.
So far, I found the following resources that I considered as helpful:
- Lambda trigger code examples:
[AWS Cognito: Best practice to handle same user (with same email address) signing in from different identity providers (Google, Facebook)](https://stackoverflow.com/questions/59635482/aws-cognito-best-practice-to-handle-same-user-with-same-email-address-signing)
- The related issue if you link the user for the first time:
[Cognito auth flow fails with “Already found an entry for username Facebook_10155611263153532”](https://stackoverflow.com/questions/47815161/cognito-auth-flow-fails-with-already-found-an-entry-for-username-facebook-10155)
By the way, Firebase has this already in its documentation:
[https://firebase.flutter.dev/docs/auth/usage/#linking-user-accounts](https://firebase.flutter.dev/docs/auth/usage/#linking-user-accounts)
Thanks,
Bjoern :)
Contributor guide
Assessment
This issue has not been assessed yet.