Content Delivery API and SQL/Windows membership providers?

Vote:
 

Is it possible to use sql and windows membership providers togheter with the Content Delivery API? 
I see that the Content Delivery API uses ASP.NET Identity and OAuth. So after installing the nuget packages and configuring the owin startup we are not able to log in to episerver with our existing sql-users or local windows admin user.

 

#196259
Aug 23, 2018 12:07
Vote:
 

Thomas, ContentDeliveryApi.Cms works with membership providers but ContentDeliveryApi/.OAuth does not. At least not to my knowledge. I spent a couple hours myself putzing with it and eventually gave up. After switching over to ASP.NET Identity it worked immediately. 

As for not being able to sign in after installing ASP.NET Identity... I don't know why Epi doesn't add this to the documentation, but check Alloy. It uses Identity, and there is some OWIN-registered plumbing that brings up a default admin account creation page when Identity is first provisioned. 

In the latest version of Alloy, go to ~/Startup.cs and look for--

app.UseAdministratorRegistrationPage(() => HttpContext.Current.Request.IsLocal);

Follow the UseAdministratorRegistrationPage code to figure out what it is doing. Then reproduce (or just copy-paste) all that plumbing--controller, view, etc.--in your own solution. When you Ctrl+F5, you will get an administrator account creation form which will let you get back into Episerver. Identity uses a completely different user store than your old membership provider, so none of your users/groups will be there, but you can take it from there. 

#201386
Edited, Feb 18, 2019 6:08
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.