Am failry new to authentication logic, would anyone be able to tell me if I am missing something here as it seems a little too good to be true. I validate users using something like this;
if (validateUser(form.Email, form.Password))
{
return signIn(form.Email);
}
the validateUser function returns a boolean value. Sign in then does something like this;
public void signIn(string email)
{
FormsAuthentication.SetAuthCookie(nameOfUser, false);
}
Which will subsequently allow me to do things like this for all future requests;
string userEmail = User.Identity.Name;
Profile p = Profile.getProfileFor(userEmail);
This seems a little too simple to be safe! Is there anything I'm missing here / any blindingly obvious security risks? Or is this basically how it's done?
Regards,
Mike