Last post Dec 12, 2019 04:46 AM by Khuram.Shahzad
Dec 09, 2019 07:51 PM|qwertz|LINK
I use ASP.NET Core 3 Identity for my application. Application is created by using Angular template (Individual User Accounts) in Visual Studio. Is there any way to show login page when user visits my application? For example, when I type https://localhost:5001 I
expect to see only login page without navbar.
My idea was to modify launchSettings.json and add line "launchUrl": "https://localhost:5001/authentication/login". Is there any better solution?
Dec 09, 2019 08:47 PM|bruce (sqlwork.com)|LINK
you can change the default route to login first, but you need to decide what happens when the login cookie expires. how does the angular app detect this.
a better approach is to have your webapi return an authentication error that the angular app detects. then the angular app redirects to the login page or implements a login component.
Dec 12, 2019 04:46 AM|Khuram.Shahzad|LINK
You can use Authentication guards: