Last post Aug 25, 2014 04:53 AM by Michelle Ge - MSFT
Aug 21, 2014 09:35 PM|pradykris|LINK
I have 2 projects, one an webapi project where in i create new users and i also have a standard mvc5 app, both using the same database.
I had added profile information of the user in webapi using the method defined in
SO post I am able to create the users. But when i try to login into the normal mvc5 app with the credentials of users created by webapi. i get a invalid username and password.
i can login only with users which i have created from the standard mvc5 app. I had created the webapi with the code first approach and used the database first approach when creating the normal mvc app. Would there be a difference in the hash for password
while creating and authenticating from webapi and normal mvc app? How can we get the users to work both from webapi and standard mvc5.
I can see that there is a difference in the discriminator field when created from webapi (customuser) and from the normal mvc as (ApplicationUser)
Aug 25, 2014 04:53 AM|Michelle Ge - MSFT|LINK
According to your description, I think you shuld make sure the encryption function is same between WebAPI and MVC application. Then I think you should make some break points to debug steps by steps. We can check if the useraccount and password which is not
THe same time you need to check that as youi create a project, if you have select the Individual User Account by clicking Change Authentication. For more information, please refer to the link below:
Hope it's useful for you.