evak2979
  • Posts: 14
  • Joined: 04/04/2014
In short.
Membership Provider has been removed by the latest MVC version in favor of OWIN which allows both local and external provider authentication.
I am trying to use the new identity authentication (to be future proof for at least a year till Microsoft changes things all over again 😛 ) and have a central login on my website, which will then logon/logoff the user on the forums as well.
Problems:
Webconfig's no longer the place to declare forms authentication, since OWIN is taking over. - Solution: I thought of naming the OWIN cookie to .YAFNET_Authentication. Then perhaps membership.Create user whenever a user registers...However, with the external provider, I am not given a password to register for the user..etc. etc.

Is there an easy way about this? Has anyone done it, integrating OWIN Auth with YAFNET?

THanks 🙂
Sponsor
Zero2Cool
  • Posts: 1082
  • Joined: 26/04/2011
I ported over 3,000 users from sql membership to the identity framework just recently, but we disabled external authentications such as Google+, Facebook, etc ...

As for doing this for YAF? I have not. Importing the users from YAF which I believe uses ASPNET membership to the identity framework shouldn't be difficult. When it comes to the external authentication such as Facebook, Twitter, etc ... I do not know how that would work. I've moved my site over to VS2013 bootstrap template with YAF but simply left the membership intact because it works.
evak2979
  • Posts: 14
  • Joined: 04/04/2014
Thanks for the response,
I am devoting my day today in figuring out how I could make this work.
An assumption (though I could be wrong) is that if I name my cookie after the auth cookie, then if someone's logged on, they should also appear logged on to yaf which would membership-query on a user based on the authentication, etc..
I would like to leave 3rd-party enabled (as it helps me understand OWIN better, this is a personal project).
But my question is, if all registration happens through my main site, I suppose I'd have to call the membership provider straight after and populate at least SOME values in YAF, namely a username. Now if I can find a way (there must be) for third party providers to also give access to user email...
Let's see, at least it's fun to explore 🙂
Zero2Cool
  • Posts: 1082
  • Joined: 26/04/2011
I think you could get it done. From what I "think" I know about the identity framework is that it's basically a one stop shop for all membership authentication types. Perhaps create a test project and enable the external authentications and compare the differences with YAF? I don't even know how YAF does it so I am rather useless on that front.

My main focus on my projects are converting them to bootstrap. Once that is completed and YAF is moved to bootstrap, I'll probably attempt to convert to Identity Framework as well. 🙂
evak2979
  • Posts: 14
  • Joined: 04/04/2014
Though the post is derailing towards Bootstrap, it's my post and I don't mind it at all since I've taken an interest into bootstrap as well as of late 😛 . (being a PhD student for 3 years now, I've lost touch with the fun coding stuff, and I am trying to catch up :)

When you say convert to boostrap - is it anything more other than installing boostrap and adjusting class values, and inserting bootstrap components? ( I feel like I am missing a BIG part of the pic when it comes to BS 🙂
Zero2Cool
  • Posts: 1082
  • Joined: 26/04/2011
Originally Posted by: evak2979 

Though the post is derailing towards Bootstrap, it's my post and I don't mind it at all since I've taken an interest into bootstrap as well as of late 😛 . (being a PhD student for 3 years now, I've lost touch with the fun coding stuff, and I am trying to catch up :)

When you say convert to boostrap - is it anything more other than installing boostrap and adjusting class values, and inserting bootstrap components? ( I feel like I am missing a BIG part of the pic when it comes to BS :)



haha sorry ... didn't mean to sidetrack your thread.

Bootstrap is responsive design layout, meaning the content will restructure depending on your resolution. By convert, I am meaning re-designing pages to implement the components and usage of bootstrap.

Essentially, I'm going through each page in all my projects and getting rid of things like this ...
<table>
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
</table>


in favor of goodness like this


div class="row">
  <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-addon">
        <input type="checkbox">
      </span>
      <input type="text" class="form-control">
    </div><!-- /input-group -->
  </div><!-- /.col-lg-6 -->
  <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-addon">
        <input type="radio">
      </span>
      <input type="text" class="form-control">
    </div><!-- /input-group -->
  </div><!-- /.col-lg-6 -->
</div><!-- /.row -->



That's probably not the greatest example since it's not one to one, but hopefully you get the idea. Check out http://getbootstrap.com/components/  for a better explanation.

Basically going from a TABLE layout to a GRID layout which gives us a lot of flexibility. If I had a better handle on YAF and a blueprint to follow, I'd be throwing my hands in the YAF project too.



Edit, Yes, by converting I am mean it as in using the bootstrap classes and inserting bootstrap components. It's essentially a web developers wet dream of tools to use lol. I have several work projects a few side projects that I'm utilizing bootstrap with. So far all clients have been impressed.
evak2979
  • Posts: 14
  • Joined: 04/04/2014
Yeah, I thought so, it sounds pretty cool to have (Especially since most of us that I know are not particularly fond of spending hours on css and such)
Don't worry about sidetracking, all good info is welcome 🙂
Users browsing this topic
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved