PreSign Up trigger with autoConfirm user does not seem to work with Authenticator component
See original GitHub issueWith the authenticator component, if I use the pre SignUp trigger to autoconfirm user, I am still able to see the confirmation code prompt, though I do not receive any verification email. When I enter a garbage value it gives me an error message as follows:
User cannot be confirmed. Current status is CONFIRMED
I tried searching in git issues, though not able to find anything there on this behavior. Closest was this: https://github.com/aws-amplify/amplify-js/issues/2588
below is a simple lambda trigger I am testing with:
import json
def lambda_handler(event, context):
event['response']['autoConfirmUser'] = True
return event
I am able to see that the user comes out as CONFIRMED, though not able to understand how to remove the confirmation prompt.
Sample screenshot of the behavior here: https://ibb.co/F06GQTJ
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Pre sign-up Lambda trigger
Pre sign-up example: Auto-confirm users from a registered domain. You can use the pre sign-up Lambda trigger to add custom logic that validates...
Read more >Pre Sign-up Lambda Trigger autoConfirmUser not working
Using Pre Sign-up trigger you can only set email/phone to verified or user status to CONFIRMED . Password change will be required in...
Read more >Advanced workflows - Lambda Triggers - AWS Amplify Docs
The following is an example of how to configure the aws-amplify-vue authenticator components so that your app displays a message telling the user...
Read more >AWS Amplify: Adding a user to a group programmatically
On your React component's render function, drop in the Authenticator component. Here we are requiring a custom attribute "Manager ID" which will ......
Read more >Automatically fill in verification codes on iPhone
If prompted, select the option to use an authenticator app. When asked for a verification code, tap the suggestion that appears above the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jordanranz can you let us know what the built-in workaround is?
The updates in the new authenticator are now merged and in place. If you’re using a PreSign up lambda trigger to auto confirm users, the authenticator will detect this and now skip the confirm verify page.
Please note, that if the user is confirmed, but their email is NOT confirmed, the next time they sign in they will be asked if they’d like to confirm their email. They don’t have to confirm their email, they will still have an option to
skip
at the bottom of the page.If you’d like a user to never confirm their email, then you’ll need to setup the lambda trigger to confirm the email as well as the user. Like this.
I’ll close this issue, but feel free to create another one if this doesn’t work for you.
Here is the documentation to get started if you’d like to try this out
https://ui.docs.amplify.aws/ui/getting-started/installation