Auth0 passwordless login by email link is failed

I am suffering from the passwordless login of the auth0 authentification now.
I am implementing passwordless(magic link) login by email(or link)(no code).
After submitting using email, I received the verification email on Gmail and pressed the link button but it doesn’t well.!
I think, redirect URL setting is in problem.
I need the help urgently. :worried:



Hi @TommyLee,

Welcome to the Auth0 Community!

I understand that you are encountering issues with Passwordless Login.

First, could you please try using the default Lock (passwordless) template and then including the redirect_uri parameter in your authorization request? Then seeing if you are still encountering this issue?

By default, the Auth0LockPasswordless template already defines the behavior for redirecting your application to your Callback URL defined in your applications settings.
Example in Lock:

var lock = new Auth0LockPasswordless(config.clientID, config.auth0Domain, {
  passwordlessMethod: 'link',
    auth: {
      redirectUrl: config.callbackURL,
      ...
    },
  ...
})

Example auth request:

GET https://{{YOUR_DOMAIN}}.auth0.com/authorize?
    response_type=code&
    client_id=clientID&
    redirect_uri=https://{{YOUR_DOMAIN}}.auth0.com/callback&
    scope=SCOPE&
    audience=API_AUDIENCE&
    state=STATE

Since the Universal Login serves the Login page for all of your applications, hardcoding the callback URL in the Universal Login is generally not a good practice, because your Login page would not be able to dynamically redirect your authenticated users to any other URL’s on other Auth0 applications besides the one you defined.

Therefore, I recommend that you leave the redirectUrl defined as config.callbackURL to dynamically redirect your users to the correct callback URL defined in your application.

Please let me know if this resolves your issue.

Thank you.

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