Auth0 Home Blog Docs

Login on Asp.Net Core 3.0

Hi.
I have created a new Core 3.0 web app and followed the quickstart guide on how to implement login functionality in Asp.Net Core 2.1, since there is no guide for 3.0.
A lot of the things are very similar, and my code looks almost the same as in the guide. The only difference is that I started with a Core 3.0 project.

When I start the app it seams like there are some problems with understanding that the app does not use controllers, since Core 3.0 uses Razor Pages by default.
I managed to make my web app create an endpoint for AccountController methods, but when I hit the Login method, I am met by a Page Not Found (the default Chrome one).

I have also read the Core 3.0 API guide, which was released a few months ago, but that does not seem to explain anything.

Is there something different that I need to know in order to implement Auth0 authentication in a Core 3.0 web application as opposed to 2.1?
Please enlighten me.

I am still very new to both web apps, authentication and Auth0, so all help is appreciated.

Can someone help? I feel like this issue must be much more wide-spread than just affecting me, as Core 3.0 is the current version. Unless I am missing something obvious.

Hey there @MatthiasLA!

The internal request for updating Core 2.1 content to 3.0 has been made. Let me check the status of that and see how’s it going.

I was told that the work is in progress however there are other priorities for that team before the end of the year so I wouldn’t expect something coming here before early next year unfortunately.

I found out what the problem was.

Apparently ASP.NET Core 3 does not setup routes for controllers automatically like in MVC, even though I have specified it in the Startup.cs file.

I have to explicitly state that a Controller is a Controller by using an attribute and specify the route with the Route attribute for each action.

If anyone has a way to solve this, it would be nice.

So all in all, it now works and I can authenticate using Auth0.

Glad to hear that Matthias!