Auth0 Home Blog Docs

Custom Domain with ASP.Net Core Web Site

Hi,

I’ve managed to run ASP.Net Core web site with Auth0 authentication flawlessly.
That required minimum configuration on Auth0 side and pretty simple coding in StartUp.cs (as appeared in documentation).

However, the addition of a custom domain doesn’t work - I still get “zzzzzz.auth0.com” domain when Universal Login loads.

Should I adjust the configuration settings in StartUp.cs?
What settings govern the transition to custom domain during login?

Regards

On the .Net side, and assuming your code picks up the configuration as in the quickstart, you should only need to change the zzzzz.auth0.com domain configuration value in the settings file (appsettings.json) to your custom domain (https://github.com/auth0-samples/auth0-aspnetcore-mvc-samples/blob/master/Quickstart/01-Login/appsettings.json#L18).

On the Hosted Login Page, make sure you configure Lock as explained here: https://auth0.com/docs/custom-domains/additional-configuration#universal-login

Check the HTTP trace from the browser’s developer tools. If the app redirects to https://zzzzz.auth0.com/authorize when requesting an authentication, then the application is not picking up the configuration change.

Hi Nicolas,

It works perfect :slight_smile:

Actually, I tried it in the first place, and the changes didn’t work…
Probably, it takes some time to propagate the changes when it’s related to the custom domains

Thank you :+1:

2 Likes

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