How to skip auth0 login page and go directly to social connection auth 2.0 page?

So I am building an app where the only way for the user to login to the app is by using linkedin. Now, instead of redirecting the user directly to linkedin’s Auth 2.0, it redirects the user to my domain on auth0 first and has auth0’s login and sign up. I don’t want this. I want it where after you click login, the user get’s redirected directly to Linkedin’s confirmation page and skip the auth0’s authentication page. I know it has something to do with the authentication options and connectionscopes? But I don’t know to customize it. Here is my login code:

 login() {
    this.loading = true;
 const options = {
  auth: {
    connectionScopes: {
      'linkedin': ['scope1', 'scope2']
    }
  }
};
    // Authorize login request with Auth0: open login page and get auth results
    this.Client.authorize(options, (err, authResult) => {
      if (err) {
        throw err;
      }
      // Set Access Token
      this.storage.set('access_token', authResult.accessToken);
      this.accessToken = authResult.accessToken;
      // Set Access Token expiration
      const expiresAt = JSON.stringify((authResult.expiresIn * 1000) + new Date().getTime());
      this.storage.set('expires_at', expiresAt);
      // Set logged in
      this.loading = false;
      this.loggedIn = true;
      // Fetch user's profile info
      this.Auth0.client.userInfo(this.accessToken, (err, profile) => {
        if (err) {
          throw err + 'bad stuff';
        }
        this.storage.set('profile', profile).then(val =>
          this.zone.run(() => this.user = profile)
        );
        console.log(this.user,'profile');
      });
    });
    return this.user
    // admin.auth().createCustomToken(this.accessToken).then(function)
  }

thank you for the assistance and have a good day!

1 Like

Did you get the answer yet?

1 Like

See the thread here:

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