How it works...

Before authentication, the /mailbox/index page will redirect to the login page. After authentication, the /mailbox/index page will work.

Basically, the app rejects every request made before authentication and redirects them to the login page.

After authentication, the browser receives an authentication cookie and accepts requests that require authentication.

Get ASP.NET Core MVC 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.