User Sign up ==> Account is auto confirmed ==> a custom email is send to email to verify email ==> user can login without verifying email since its account is already confirmed. When user click on the link his email is verified.
Above is the user signup flow that I want. Till now, I'm verifiying the account by trigger a lambda in cognito's presignup trigger. However, using this way, email is not triggered. So I'm verifying account from signup lambda itself using adminConfirmSignup method. Now we user click on link, we get error that account is already verified, but I want its email to be verified whne the link is clicked.
My Current Solution:
Confirm the user account by adminConfirmSignup, and send the api gateway link contains username / client_id / confirmation code instead of default link. The Api gateway will point to a lambda where I'll confirm the code and update the user'email attribute, but how can I verify the confirmation_code?
Is there any other solution available?
Also the custom email that is being send to the user, I'm including a button and a click eventlistener in it, event listener seems to be not working. Any reason?