dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.58k stars 25.29k forks source link

How to migrate Identity users from MVC5 to ASP.NET Core #9770

Open simeyla opened 5 years ago

simeyla commented 5 years ago

See this Stack Overflow question.

This article doesn't describe how to migrate anything. Migration of 'Identity' implies migration of data, but this article doesn't discuss that at all.

There's a package AspNetCoreCompat intended to help with that, but no documentation for it. https://github.com/aspnet/Identity/issues/2043

Some information about how to migrate the schema would be very useful. There is a similar article for Membership > Identity which contains SQL but this article has none.

EDIT by @Rick-Anderson

2,500 PV per month, but important customers. Additional issues:


Document Details

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

Rick-Anderson commented 5 years ago

You're right it doesn't have any migration of data. What about Migrate from ASP.NET Membership authentication to ASP.NET Core 2.0 Identity that you mentioned?

Rick-Anderson commented 5 years ago

Thanks for contacting us. We don’t have the resources to invest in this area, so we are closing the issue. Should your request generate enough 👍 responses, we’ll reconsider.

AlissonRS commented 5 years ago

If you don't want to ask users for resetting their passwords, but want to gradually update password hashes to the new algorithm as they authenticate, I posted what I did in this Stack Overflow question.

However If you can ask for password resetting, that's better I think.

DanJ210 commented 4 years ago

Create the controller and actions? I came here for that reason. I'm using the Identity tutorial and I scaffolded Identity to my project and added the migration to my database. The area, views, model context seem to all be set even though I had an existing context and this scaffold created a second one... The only problem is no controller so the "Register" and "Login" buttons or links just reload the page. They go nowhere, there's no controller.

Rick-Anderson commented 4 years ago

@DanJ210 you need to Scaffold Identity. It's now a RCL.

Rick-Anderson commented 4 years ago

@HaoK this issue is correct, the article vaguely shows how to migrate the UI to ASP.NET Core 1.x.

See this SO link for an approach.

I think a better approach is to replace this doc with a new one:

This topic is low traffic, less than 4K user/month, but it's like 4K important users. @mkArtakMSFT please set priority.