Login with Twitter - Second modal?

Hello,

I am using @auth0/auth0-react to login on my webapp with Twitter.

// Using this: 
loginWithRedirect: (
    options?: RedirectLoginOptions<AppState>
  ) => Promise<void>;

// With these autorization params: 
 {
  audience: `https://.../api/v2/`,
  redirect_uri: window.location.origin,
  scope:
    "openid email profile read:current_user update:current_user_identities",
  connection: "twitter",
};

Everything works fine but when a new user logs in (and in consequence creates the profile on auth0), two steps are required to complete the signup.

I am wondering if there is a way to avoid having the user go through these two steps.

After pressing login, first the user sees the following page:

After logging in with Twitter, the user is presented the following page:

Is it possible? if the account is being created, I don’t understand why the need for the second modal.

Thanks,
Claudio

Hi @claudio.villalobos

Welcome to the Auth0 Community!

Thank you for posting your question, if you are testing your app on localhost you are not able to skip consent.

As localhost is never a verifiable first-party (because any malicious application may run on localhost for a user), Auth0 will always display the consent dialog for applications running on localhost regardless of whether they are marked as first-party applications. During development, you can work around this by modifying your /etc/hosts file to add an entry such as the following:

127.0.0.1 myapp.example

https://auth0.com/docs/get-started/applications/confidential-and-public-applications/user-consent-and-third-party-applications#skip-consent-for-first-party-applications

I should be normal once you deploy it. I hope this will help you!

Thanks
Dawid

2 Likes

Ohhh I see. Great! Thanks for the quick response :slight_smile: