Copied to clipboard

Flag this post as spam?

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


  • Phil G 3 posts 23 karma points
    Jan 30, 2014 @ 06:36
    Phil G
    0

    Umbraco and Microsoft.Owin.Security

    Hi,

    Has anyone had any experience integrating Umbraco with the current batch of Microsofts Owin security providers for Facebook, Google, Twitter etc... This functionality comes out of the box with new MVC projects but doesn't seem to be easily intragrated into a new Umbraco 7 install. Has anyone had any success integrating these?

    Thanks, Phil.

  • Per Ploug 865 posts 3491 karma points MVP admin
    Jan 31, 2014 @ 10:21
    Per Ploug
    0

    Hi Phil

    Where do you want to use these providers? for website members? - I dont see a reason why it shouldnt work, as umbraco is just a normal mvc website with some pre-wired routing and data.

  • Dan White 206 posts 510 karma points c-trib
    Jun 04, 2014 @ 20:03
    Dan White
    0

    @Phil

    Were you able to get this working? I'm looking into integrating it with Umbraco members. If so, any code you could share?

  • MK 429 posts 906 karma points
    Jun 04, 2014 @ 22:55
    MK
    0

    Hi Dan, 

    I've created a facebook login with it which seems to work.

    Do you want to have the code or I can setup a quick package for you to try.

    Moshe

     

     

  • Pat Mancini 5 posts 25 karma points
    Jul 11, 2014 @ 00:56
    Pat Mancini
    0

    Hi @Moshe any chance you can share your code ? We are in the process of creating a social login for members using Facebook. Its quite straightforward with a basic MVC Project but a package would be awesome. 

     

    cheers

    -Pat

  • MK 429 posts 906 karma points
    Jul 13, 2014 @ 20:16
    MK
    0

    Hi Pat, 

    You can download the package from here

     

     

    Add the following to ur appsetting:

    <add key="FacebookAppId" value="YourAppId" />

    <add key="FacebookAppSecret" value="YourAppSecret" />

    <add key="FacebookMemberType" value="YourMemberType"/>

    <add key="FacebookMemberGroup" value="YourMemberGroup"/>

    and add the following to assemblyBinding 

    <dependentAssembly>

         <assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780CCD10D57B246" culture="neutral" />

            <bindingRedirect oldVersion="1.0.0.0-4.1.0.0" newVersion="4.1.0.0" />

          </dependentAssembly>

        <dependentAssembly>

            <assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780CCD10D57B246" culture="neutral" />

            <bindingRedirect oldVersion="1.0.0.0-4.1.0.0" newVersion="4.1.0.0" />

    It uses the DotNetOpenAuth library.

    Let me know if all is ok and if you need the source code.

    Regards,

    Moshe

  • Paul Sørensen 304 posts 650 karma points
    Nov 11, 2014 @ 21:42
    Paul Sørensen
    0

    Hi Moshe

    Do you know what I'm missing here?

    The model item passed into the dictionary is of type 'Umbraco.Web.Models.RenderModel', but this dictionary requires a model item of type 'System.Collections.Generic.ICollection`1[Microsoft.Web.WebPages.OAuth.AuthenticationClientData]'.

     

    /Paul S

  • MK 429 posts 906 karma points
    Nov 12, 2014 @ 12:29
    MK
    0

    Hi Paul,

    How did you get this error?

    Can you share the code in order to get a better understanding of the error.

    Regards,

    Moshe

  • Paul Sørensen 304 posts 650 karma points
    Nov 12, 2014 @ 14:18
    Paul Sørensen
    0

    Hi Moshe

    I have installed your package and updated the web.config so that's all. I haven't made any code myself. (Of course create page with your partial view)
    I think the problem is - where does the model come from?

    /Paul S

  • MK 429 posts 906 karma points
    Nov 12, 2014 @ 14:37
    MK
    0

    Is it umbraco ver 7.1?

  • MK 429 posts 906 karma points
    Nov 12, 2014 @ 14:59
    MK
    0

    Hi Paul,

    Make sure to pass the OAuthWebSecurity.RegisteredClientData to the partial:

    @Html.Partial("_ExternalLoginsListPartial",OAuthWebSecurity.RegisteredClientData)

    Regards,

    Moshe

  • Paul Sørensen 304 posts 650 karma points
    Nov 12, 2014 @ 14:59
    Paul Sørensen
    0

    Yes

  • Paul Sørensen 304 posts 650 karma points
    Nov 12, 2014 @ 17:53
    Paul Sørensen
    0

    HI Moshe

    I have this in my login.cshtml file and get this

     

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage @{     Layout = "umbLayout.cshtml"; } @{ Html.RenderPartial("_ExternalLoginsListPartial"OAuthWebSecurity.RegisteredClientData); }

    and get this

    HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

    /Paul S

  • MK 429 posts 906 karma points
    Nov 13, 2014 @ 07:01
    MK
    0

    Pleae reinstall the package again.

  • SinkyPars 132 posts 175 karma points
    Nov 25, 2014 @ 15:58
    SinkyPars
    0

    Thank's for sharing this. You don't happen to have any sources for introducing a Twitter login into your code?

     

    Many thanks

     

    Scott

     

     

Please Sign in or register to post replies

Write your reply to:

Draft