DonatoDeluxe
Asp.Net 7.0 MVC Project - Authentication/Authorization
thank you. i just don't rly understand how i have to use it since these documentations don't have any examples...
is it correct that i have to assign it in the constructor like:
and then later just use ?
48 replies
Asp.Net 7.0 MVC Project - Authentication/Authorization
so i guess i don't map the password parameter here to the user object right?
i'm so confused.... i don't get how i should set the
User.PasswordHash
when creating a user. it doesn't seem that either IdentityUser
or UserManager
has a method for hashing the inputted password string48 replies
Asp.Net 7.0 MVC Project - Authentication/Authorization
since password is not just a string property anymore, i would have to change it everywhere i used it. same with the ID property. i used an int type but the framework uses a string type as ID
48 replies
Asp.Net 7.0 MVC Project - Authentication/Authorization
so i have to extend the user class like
public class User : IdentityUser
right?
the thing is, that it fucks up my whole code for the user class....
i guess i should just delete my user class and use IdentityUser
48 replies
Asp.Net 7.0 MVC Project - Authentication/Authorization
i can start the application and it behaves as i wanted to.
if no user is logged in, i can access actions with the attribute. if i want to access one where is set, then it redirects me to the login page. after i log in as a user, it still behaves like i'm not logged in so therefore sends me back to the login page once i want to access an "AdminOnly" action as a logged in admin.
48 replies