Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Nov 27, 2015 @ 22:07
    Biagio Paruolo
    0

    U7.3.1 - UmbracoIdentity: How to associate a "OAuth/social" login to an already register member?

    U7.3.1 - How to associate a "OAuth/social" login to an already registered member?

    That is: a registered member can after associate its "social" login so he can login with normal login or social.

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Nov 28, 2015 @ 09:02
    Biagio Paruolo
    0

    The documentation on this new feature is more sparse. Is there a better doc / help for the Umbraco community?

  • Matthieu Nelmes 102 posts 385 karma points
    Nov 28, 2015 @ 16:51
    Matthieu Nelmes
    0

    I'm currently working on a similar concept.

    I can verify the user by getting an accessToken back from Facebook once they've approved. I can then find the member by looking them up via their Facebook ID.

    However I'm just struggling to see how I can actually Authenticate (log them in) as an Umbraco member as I still lack a password and the only member authentication method I can find is Login(username, password)

    https://our.umbraco.org/forum/developers/extending-umbraco/73276-authenticating-member-via-facebook-login

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Nov 28, 2015 @ 19:25
    Biagio Paruolo
    0

    My idea is to extend member profile with 2 proprierties: social network id and token. So the user can associate social login from its private area and so memorize id and token in these fields. When he login with oauth, if ok we need to check wich member has social id / token and then authorize the logon passing login and password. The password is retrieved by Umbraco membership service.

  • Matthieu Nelmes 102 posts 385 karma points
    Nov 28, 2015 @ 20:24
    Matthieu Nelmes
    0

    That was what I thought,

    Except the user Password retrieved from the member service is a hash, not the actual plain text password. You can disable this so that the passwords are stored as plain text but then you are compromising on security.

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Nov 29, 2015 @ 15:01
  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Nov 29, 2015 @ 08:35
    Biagio Paruolo
    0

    Uhm...How to? Any help from Umbraco team?

  • Matthieu Nelmes 102 posts 385 karma points
    Nov 29, 2015 @ 20:15
    Matthieu Nelmes
    0
    System.Web.Security.FormsAuthentication.SetAuthCookie(email, true);
    

    Certainly looks like the ticket! Will test and report back tomorrow.

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Mar 01, 2016 @ 09:45
    Biagio Paruolo
    0

    Hi, Any updates?

  • Matthieu Nelmes 102 posts 385 karma points
    Mar 01, 2016 @ 17:40
    Matthieu Nelmes
    0

    EDIT I actually posted a full example on another thread: https://our.umbraco.org/forum/developers/extending-umbraco/73276-authenticating-member-via-facebook-login

    Yes, this is what worked for me but unfortunately I do not have access to the code that I used. It was in a project for a previous company.

    However the concept is solid. I extended the member document to include a Facebook User Id. Once they've authenticated with Facebook, the first thing I do is query my members for that Facebook Id. If it exists then they are a returning user so just log them in by setting the AuthCookie with SetAuthCookie(email, true)

    If the Facebook user Id doesn't exist, then they are either a completely new customer, or this is their first time logging in with Facebook so they would need to link to the existing account.

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Mar 01, 2016 @ 19:39
    Biagio Paruolo
    0

    How to auth with Facebook? Do you use Skybrud lib?

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Nov 30, 2015 @ 10:38
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies