Auth0 Home Blog Docs

Login with a specific connection



I followed the Angular2 documentation and all is working just fine, except on thing - I can’t choose my desired connection properly,
On the Auth0 sandbox I disabled all connections except the one I want. The issue is, that when the user is redirecting to the login page, first he’s redirected to the default Auth0 login page, and than there is a button that says “Log in at MY-WANTED-CONNECTION-NAME”. I want the user to move directly to my connection login page, without the need to click this button on his way,

This is how the webAuth is defined in my code:

  auth0 = new auth0.WebAuth({
    clientID: MY-CLIENT-ID,
    domain: MY-DOMAIN-URL,
    audience: MY-API,
    connection: MY-WANTED-CONNECTION,
    responseType: 'token id_token',
    redirectUri: CALLBACK-URL,
    scope: 'profile'


You need to pass the connection as an option to the authorize method call and not as an option for the WebAuth constructor.