AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Update the 2.1 authentication examples -> at Startup.cs .AddDefaultUI() method is missing

Open hubekpeter opened this issue 8 years ago • 5 comments

Since 2.1 the identity views have been moved under the separate area. The examples would not work without .AddDefaultUI() method been called.

services.AddIdentity<IdentityUser, IdentityRole>() .AddEntityFrameworkStores() .AddDefaultTokenProviders() .AddDefaultUI();

Thanks P.

hubekpeter avatar Jun 09 '18 20:06 hubekpeter

Which topic @hubekpeter?

guardrex avatar Jun 09 '18 20:06 guardrex

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/ws-federation?view=aspnetcore-2.1 -> Add WS-Federation as an external login provider for ASP.NET Core Identity

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/accconfirm?view=aspnetcore-2.1&tabs=aspnetcore2x -> Require email confirmation

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/?view=aspnetcore-2.1 -> Under the Facebook, Twitter, Google etc.

hubekpeter avatar Jun 09 '18 20:06 hubekpeter

I was just taking a look at the issues, and there are several that pertain to updating Identity for 2.1. Those issues should cover this one. The work is going on now, and I doubt it will take long to get the topics updated.

https://github.com/aspnet/Docs/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+identity

Sample updates are tracked by #5495.

guardrex avatar Jun 09 '18 21:06 guardrex

Did run into the same issue when using a customized Identity. If services.AddDefaultIdentity is used there is no issue with the separate area, but as soon as services.AddIdentity is used, AddDefaultUI needs to be added to get correct routing. Otherwise (it not authorized, for example) it routs to /Account/Login and not to /Identity/Account/Login. My two cents.

samisin avatar Jul 06 '18 17:07 samisin

Dup of #9706, #9706, #10418

Rick-Anderson avatar Jan 23 '19 02:01 Rick-Anderson