Copied to clipboard

Flag this post as spam?

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


  • Anton Oosthuizen 206 posts 486 karma points
    Jun 16, 2015 @ 19:39
    Anton Oosthuizen
    0

    7.2 Login with Facebook

    Good Day

    Members.Login requires a password. How do I go about logging in without a password ?

    Thanks

  • stevo 63 posts 106 karma points
    Jun 16, 2015 @ 20:57
    stevo
    0

    You might want have a look at the version 7.3 beta

    Support for Asp.Net Identity including support for oAuth. This allows you to authenticate Umbraco users using oAuth providers like Facebook, Google, or your own provider. And if you use a custom membership

    7.3.0-beta-released

  • Tom Van Rompaey 38 posts 136 karma points
    Oct 01, 2015 @ 14:03
    Tom Van Rompaey
    0

    Now that 7.3.0 is released... How can you use Asp.Net Identity with oAuth for a Facebook login?

    In the blogpost there's a link to UmbracoIdentityExtensions (https://github.com/umbraco/UmbracoIdentityExtensions) but there doesn't seem to be any documentation about implementing this. Any help?

  • stevo 63 posts 106 karma points
    Jul 10, 2015 @ 17:45
    stevo
    0

    Have a look at Jan's post

  • Comment author was deleted

    Oct 01, 2015 @ 15:15

    Also trying to get this running from what I can see

    First Install Umbraco 7.3 then install the facebook identity extension

    Install-Package UmbracoCms.IdentityExtensions.Facebook
    

    that will add some files to the app_start folder

    One of those files is the UmbracoCustomOwinStartup there add the line

    app.ConfigureBackOfficeFacebookAuth("your facebook app id", "your facebook app secret");
    

    if you don't have an app yet create one with https://developers.facebook.com/

    Then update the web.config to use the custom owin startup class so in web.config the owin:appStartup key should be the following

     <add key="owin:appStartup" value="UmbracoCustomOwinStartup" />
    

    now if you go the your profile in the umbraco backoffice you should see a facebook link to link your account

  • Comment author was deleted

    Oct 01, 2015 @ 15:22

    Now you should see the following

    enter image description here

    enter image description here

  • Comment author was deleted

    Oct 01, 2015 @ 15:22

    But linking isn't working yet for me...

  • Thomas Morris 35 posts 133 karma points MVP c-trib
    Oct 01, 2015 @ 15:38
    Thomas Morris
    2

    Hi Tim,

    Got this working with the beta version of 7.3... you will also need to set the callback path from within UmbracoFacebookAuthExtensions.cs

    public static void ConfigureBackOfficeFacebookAuth(this IAppBuilder app, string appId, string appSecret,
            string caption = "Facebook", string style = "btn-facebook", string icon = "fa-facebook")
        {
            var fbOptions = new FacebookAuthenticationOptions
            {
                AppId = appId,
                AppSecret = appSecret,
                //In order to allow using different facebook providers on the front-end vs the back office,
                // these settings are very important to make them distinguished from one another.
                SignInAsAuthenticationType = Constants.Security.BackOfficeExternalAuthenticationType,
                //  By default this is '/signin-facebook', you will need to change that default value in your
                //  Facebook developer settings for your app in the Advanced settings under "Client OAuth Login"
                //  in the "Valid OAuth redirect URIs", specify the full URL, for example: http://mysite.com/umbraco-facebook-signin
                CallbackPath = new PathString("/umbraco-facebook-signin")
            };
            fbOptions.ForUmbracoBackOffice(style, icon);
            fbOptions.Caption = caption;
            app.UseFacebookAuthentication(fbOptions);
        }
    

    Make sure you add this to the Client OAuth Settings on your Facebook app.

  • Tom Van Rompaey 38 posts 136 karma points
    Oct 01, 2015 @ 15:44
    Tom Van Rompaey
    0

    Very useful info everyone but I'm actually looking for a way to Register/Login Members using Facebook on the frontend of the website.

    Sorry for the mixup, I should have pointed it out more clearly in my question :)

  • Comment author was deleted

    Oct 01, 2015 @ 15:50

    great thanks @thomas :)

  • Comment author was deleted

    Oct 01, 2015 @ 15:57
  • Tom Van Rompaey 38 posts 136 karma points
    Oct 01, 2015 @ 16:16
    Tom Van Rompaey
    0

    Thanks Tim!

    I'll try it out tomorrow

  • Comment author was deleted

    Oct 01, 2015 @ 16:07

    Hmm still not working, added the following to my google app enter image description here

    that should be all that was missing right @Thomas

  • Thomas Morris 35 posts 133 karma points MVP c-trib
    Oct 01, 2015 @ 16:19
    Thomas Morris
    0

    Yeah that looks right. I didn't use localhost though, not sure whether that would make a difference.

    e.g. http://seventhree.local.com/umbraco-facebook-signin

Please Sign in or register to post replies

Write your reply to:

Draft