Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identity - Update to 2.1 #7131

Closed
martinpetrovaj opened this issue Jun 19, 2018 — with docs.microsoft.com · 10 comments
Closed

Identity - Update to 2.1 #7131

martinpetrovaj opened this issue Jun 19, 2018 — with docs.microsoft.com · 10 comments
Assignees
Labels
Pri1 Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

Copy link

Guys, you can't be serious about completely changing Identity from 2.0 to 2.1 and totally ignoring the docs. Besides, why do we now have to deal with this Razor code behind nonsense in MVC applications instead of controllers? You're totally arbitrarily mixing two different approaches and forcing us to work with this mess - all that without any proper documentation. Is there still a way to scaffold MVC like Identity code when creating a new project?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@tstivers1990
Copy link

You don't have to deal with Razor Pages if you don't want to. Identity UI is just a UI implementation of Identity. It can still be used without Identity UI at all. The documentation is lacking on how to go about doing this. There has been an issue raised for the documentation issues (#6990), and it appears the docs have been updated in the repo, and are just waiting for the next publish.

While I'm a fan of Razor Pages, I'm not a fan of how Identity UI uses Areas by default. I'm not a big fan of areas because I find it counter-intuitive for my projects. But you can write your own implementation of the Identity UI. And I think, in a lot of cases, that's probably the best approach anyway.

Identity itself hasn't changed much. It's just the default template that has changed.

@Rick-Anderson Rick-Anderson self-assigned this Jun 19, 2018
@Rick-Anderson Rick-Anderson added Source - Docs.ms Docs Customer feedback via GitHub Issue P4 labels Jun 19, 2018
@Rick-Anderson Rick-Anderson added this to the Backlog milestone Jun 19, 2018
@Rick-Anderson
Copy link
Contributor

Rick-Anderson commented Jun 19, 2018

Is there still a way to scaffold MVC like Identity code when creating a new project?

No. But it's not difficult to modify to MVC. Scaffold a 2.0 MVC project and you'll be very close.

Per aspnet/Identity#1825

Maintaining two versions of the same codebase (MVC and Razor Pages) is very expensive for us and there are no real benefits from having an MVC implementation compared to a Razor Pages version. Both flavors are fully in ASP.NET.

Copy link

Guys, this is really nonsense. I don't know why you did this.

Copy link

This documentation doesn't match the current reality. At step 2, you tell us to add this code to Startup.cs:

services.AddIdentity<ApplicationUser, IdentityRole>()
    .AddEntityFrameworkStores<ApplicationDbContext>()
    .AddDefaultTokenProviders();

But (1) the new project already has a call to

        services.AddDefaultIdentity<IdentityUser>()
            .AddEntityFrameworkStores<ApplicationDbContext>();

and, (2) the new project doesn't have an ApplicationUser class, so your code doesn't compile.

@seejessicacode
Copy link

seejessicacode commented Jul 18, 2018

Now we get to explore the following the rabbit holes:

  • find what to use in place of ApplicationUser.
  • compares AddDefaultIdentity() and AddIdentity() to guesstimate which is appropriate going forward
  • roll with AddDefaultIdentity() and hope it doesn't negatively impact later steps

Any clarification on what was intended for 2.1's version of this exercise would be a big help. Thanks!

@Rick-Anderson
Copy link
Contributor

Rick-Anderson commented Jul 18, 2018

@seejessicacode

  • find what to use in place of ApplicationUser.

ApplicationUser -> IdentityUser

  • compares AddDefaultIdentity() and AddIdentity() to guesstimate which is appropriate going forward
  • roll with AddDefaultIdentity() and hope it doesn't negatively impact later steps

No need to change from AddDefaultIdentity per Changes to authentication code

@Rick-Anderson Rick-Anderson added Pri1 and removed P4 labels Jul 18, 2018
@Rick-Anderson Rick-Anderson changed the title Identity in 2.1 Identity - Update to 2.1 Jul 18, 2018
Copy link

when the docs would be updated?,what the hell you doing?

@tstivers1990
Copy link

@pangjianxin Feel free to submit a pull request if you don't feel like progress is moving quickly enough on this.

Copy link

Please update the docs, been ripping my hair on how to set this thing up.

@Rick-Anderson
Copy link
Contributor

Note to self. 40K PV

@dotnet dotnet locked and limited conversation to collaborators Aug 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Pri1 Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

No branches or pull requests

8 participants