Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How to login a member via API that is passing login and password ( hashed ) via code and not input from user?
If your code is in a macro partial view or controller or class inheriting from one of the special Umbraco base controllers / classes eg SurfaceController
Then you will have access to the MembershipHelper helpers via the Members instance.
should do it!
If you are in a custom class you can create a reference to the MembershipHelper using:
var memberShipHelper = new Umbraco.Web.Security.MembershipHelper(Umbraco.Web.UmbracoContext.Current);
Thank you. The problem is if the password is hashed.
Ahh Biagio I see;
So do you need to know, given that you have the hash, how to compare this hash to the entry in the database table ?
or are you pretty much at the stage where you just want to log the person in ?
If so I have a feeling:
will create the authentication cookie for the user, and it will be as if they just logged in.
I'll try...I need to logon the user because he logon with social network before. I explain better.
1 - the admin register the user
2 - after the user can choose to enable the login with social network so I need to create a Wizard to memorize social network ID + token.
3 - after he can login or with social or normal
Marc was bang on the money, you need to set the AuthCookie session wih:
Once I've tidied my code I'll post a full example
I've detailed the solution in my original question here:
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted