MachUpskillingFY17 / JabbR-Core

Modern edition of JabbR chat client using .NET Core
MIT License
7 stars 8 forks source link

Redirect Unauthorized to /Account/Login #253

Closed kevinleung23 closed 7 years ago

kevinleung23 commented 7 years ago

Explicitly define route for [Authorize] Attribute

Use Case: Prior to Logging in, HomeController currently displays blank screen until you navigate to ~/account/login manually

kevinleung23 commented 7 years ago

.Net Core Web Template (with Individual Auth):

 "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",

JabbR-Core:

 "Microsoft.AspNetCore.Authentication": "1.1.0-alpha1-22453",
 "Microsoft.AspNetCore.Authentication.Cookies": "1.1.0-alpha1-22453",
  1. I removed'"Microsoft.AspNetCore.Authentication": "1.1.0-alpha1-22453” from JabbR-Core with no effect (Barry’s git repo shows to have both these Nuget but not sure where it is being used)
  2. I updated the dependency version of the out of the box Web Template project to use "Microsoft.AspNetCore.Authentication.Cookies": "1.1.0-alpha1-22453" and the automatic redirect no longer works. If we navigate to “~/Home” it shows a blank screen with no redirect. This is the same situation as our JabbR-Core. When changing back to use "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0", it works again.

I was under the assumption that 1.1.0-* would have the same Authentication functionality as 1.0.0.

adamtuliper commented 7 years ago

Emailed Hao Kung who works on Identity

kevinleung23 commented 7 years ago

Close Issue pending PR #278