Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Lambda Invocation Causing Magic Link Email Error: "Please wait for one minute before sending new link" #217

Open
singhjaskaran0501 opened this issue Nov 25, 2024 · 4 comments

Comments

@singhjaskaran0501
Copy link

Hi.

I am experiencing an issue when sending a magic link to a user's email. While the magic link is generated, the process simultaneously throws an error with the message: "Please wait for one minute before sending new link."

Upon reviewing the logs, it appears that the Lambda function create-auth-challenge is being invoked twice.

Could you provide guidance or a resolution for this issue?

@ottokruse
Copy link
Contributor

Sounds like you are actually invoking initiateAuth twice. Perhaps a React hook in strict mode. But that's guessing. Can you tell us how we can reproduce this?

@singhjaskaran0501
Copy link
Author

singhjaskaran0501 commented Nov 25, 2024

Application is implemented using SvelteKit rather than React. Upon reviewing the application logs, I confirmed that the requestSignInLink method is being invoked only once by the web application. Is there be anything internally that could be the cause of twice invoking of that lambda.

@singhjaskaran0501
Copy link
Author

However, despite receiving the magic link, I am unable to log in with it. Upon reviewing the logs further, it appears that the verifyMagicLink method is not being triggered during the login attempt.

Could you provide guidance on what might be causing this issue? Are there specific configurations, middleware, or conditions that could prevent the verifyMagicLink method from being invoked? Any suggestions for further troubleshooting would be greatly appreciated.

@ottokruse
Copy link
Contributor

I''m sorry mate that's too little information to help you. Perhaps you can share a HAR file so we can look at the AJAX requests that actually go to Cognito.

Also please share how you are invoking the library--give us something to work with please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants