Magic Link Not Redirecting to Configured URL, Displays "Something Went Wrong"

Hi,

I’ve set up a Passwordless Authentication flow in Auth0 and created an application for sending magic links to customers’ emails. I’m using the /passwordless/start API to send the magic link, and the email is successfully delivered with the link.

However, when I click the magic link from the email, it opens in a new browser window and displays the following error:

“Something Went Wrong
The link must be opened on the same device and browser from which you submitted your email address.”

I expected it to redirect to the URL I configured in my application settings, but it’s not happening.

Could anyone help me understand why this is occurring? Am I missing any configuration or step in the setup?

Note: /passwordless/start API is called on nestjs backend and and callback url will redirect to the nextjs application.

Thanks in advance!

Hi Shanthi,
One issue I’ve seen is related to how URL parameters are handled, particularly if they’re using fragment identifiers (#).

You would want to make sure your application correctly handles both query parameters (those that follow ?) and fragments (after #).
Auth0’s default setup for handling URLs might not catch these nuances.
Instead of just calling the /passwordless/start API and expecting a seamless redirect, explicitly configure how you process those URLs to ensure everything matches up correctly with what your backend expects.

Also, check that your callback URL configured in Auth0 exactly mirrors what is defined in your NestJS backend setup.

Cheers,
Harsh

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.