ASP.Net Auth0 - Take user directly to social login page

I’m using ASP.Net core libraries to authenticate using Auth0. Currently flow is (Step 1) Home Page → (Step 2) Auth0 Social Login Selector → (Step 3) Social login → (Step 4) Home page (authenticated)

What I would like is to skip Step 2. Instead in my home page, i would show options for Facebook , LinkedIn etc and when user chooses one want to navigate to Step 3 above.

While docs say that connection name could be passed ( in js libraries), I don’t see a way to achieve this in ASP.Net library

//Challenge user for authentication. Once authenticated redirect to returnUrl
var authProperties = new AuthenticationProperties() { RedirectUri = returnUrl };
authProperties.SetString(“connection”, “linkedin”); // IS THIS RIGHT WAY ?
await HttpContext.ChallengeAsync(“Auth0”,authProperties);

Above is the code triggering authentication. Can you help on this.

Hi @sudhakar.raju,

Welcome to the Community!

If you pass a single connection param to the /authorize endpoint it will redirect you to the social provider, bypassing the Auth0 login page. Similar to what you have mentioned.

Assuming you are using the auth0.net library, you would pass a connection as it is documented here.

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