Issue with Passwordless Magic link authentication using embedded login

My React-Native application uses Auth0 for authentication.

We chose to go with Embedded login, are now trying to implement signing in with magic link.

(We previously succeeded in implementing Sign in with Google and Passwordless email code flows)

The problem is, that when I press the link provided in the email (e.g. on a Safar browser in an iOS iPhone 11 simulator), instead of opening the app, the browser redirects to what appears to be a universal login webpage.

Instead, I would expect the app to open, and my async call to passwordless/start to resolve the promise.

What am I doing wrong?

My code (note: same behavior happens when I test the connection on the Auth0 dashboard)

import Auth0 from "react-native-auth0";

    const auth0 = new Auth0({
      domain: *<MY AUTH0 SUBDOMAIN>*,
      clientId: *<MY CLIENT ID>*,
    });

const result = await auth0.auth.passwordlessWithEmail({
      email: 'oded.magger+example@empathy.com',
      send: 'link',
      authParams: {
        scope: "openid profile email offline_access",
      },
    });

The generated magic link:

https://<MY AUTH0 SUBDOMAIN>.auth0.com/passwordless/
verify_redirect?scope=openid%20profile%20email%20offline_access&response_type=token
&redirect_uri=<APP BUNDLE ID>%3A%2F%2F<MY AUTH0 DOMAIN>%2Fios%2F<APP BUNDLE ID>%2Fcallback
&audience=doc-server&verification_code=766032&connection=email
&client_id=<MY CLIENT ID>&email=oded.magger%2Bexample%40empathy.com

The webpage I get:

The solution was changing the Universal Login from ‘new’ to ‘classic’, in the Auth0 dashboard → Universal Login → Settings .

It is weird that the Universal Login settings impact the flow since I’m using embedded log in, but it is what it is.

Hope this helps someone else in the future!

1 Like

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