You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using the Magic Link feature in a Next.js project.
I can input the email address to which I want to receive the magic link, and I receive the Magic link in an email.
But when I click on the magic link I get the following error in the browser interface (and the website does not load):
When I change line 82 from this: history.pushState("", "", currentBrowserLocationWithoutFragmentIdentifier());
to this: history.pushState(null, "", currentBrowserLocationWithoutFragmentIdentifier());
then the Magic Link works perfectly, with no errors.
This is because Next.js expects the first parameter of history.pushState to be either an object or a null value, not an empty string.
It would be great to have the npm package updated so I don't have to maintain my own fork of the code just for this small change.
However, I don't know if this change could have a negative impact when using other frontend frameworks.
By the way, congratulations on creating this really useful project, with excellent documentation. Huge credit is deserved.
The text was updated successfully, but these errors were encountered:
Hi,
I am using the Magic Link feature in a Next.js project.
I can input the email address to which I want to receive the magic link, and I receive the Magic link in an email.
But when I click on the magic link I get the following error in the browser interface (and the website does not load):
The issue is with this function:
amazon-cognito-passwordless-auth/client/util.ts
Lines 80 to 83 in e11af28
When I change line 82 from this:
history.pushState("", "", currentBrowserLocationWithoutFragmentIdentifier());
to this:
history.pushState(null, "", currentBrowserLocationWithoutFragmentIdentifier());
then the Magic Link works perfectly, with no errors.
This is because Next.js expects the first parameter of history.pushState to be either an object or a null value, not an empty string.
It would be great to have the npm package updated so I don't have to maintain my own fork of the code just for this small change.
However, I don't know if this change could have a negative impact when using other frontend frameworks.
By the way, congratulations on creating this really useful project, with excellent documentation. Huge credit is deserved.
The text was updated successfully, but these errors were encountered: