Login a user from code with claims authentication (fba)
-
06-12-2019 - |
Question
i have a problem with logging in a user from server side on a claims (fba) enabled site. Users can register themselves on the site and get an email with a confirmation link. After they click on the confirmation link, they should be automatically logged in.
My first attempt was to log in with the authentication web service (_vti_bin/Authentication.asmx), get the cookie and add it to the page response. Unfortunaly the authentication web service returns a System.Net.Cookie instead of System.Web.Httpcookie.
Is this the right path? Is there another way?
Thanks for your help!
[Update]
Creating a Httpcookie out of the System.Net.Cookie and add this to the page response did not work either.
La solution
Try this...
SPClaimsUtility.AuthenticateFormsUser(
Context.Request.UrlReferrer,
UserName.Text,
Password.Text);
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange