Products

Solutions

Learn More

Partners

Community

Blog

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Facebook Account AssociationFacebook Account Association
Previous
 
Next
New Post
4/9/2014 12:17 PM
 

Hi All.

I'm currently in the process of creating a new fairly highly customized DNN site using DNN 7.2.2.

I previously had a DNN 5 site with around 60,000 users stored in our database. I'm rewriting a lot of the site to use C# and to implement the new features of DNN 7. 

One feature that want to add to the new site version is the ability for our users to login using facebook, google or twitter accounts. I have been testing this feature using the existing Authentication Providers, and have found that there is no problem with users creating a new account using these services, however, it seems that it is impossible to associate the existing accounts with facebook/google/twitter accounts.

I have attempted to write my own Authentication providers to associate Facebook accounts with existing DNN accounts with limited success. 

It seems that while it might be possible to log in a existing user using their facebook account, I cannot have them create an account with facebook and subsequently log in with their created DNN account.

We have looked through the source code and the problem seems to stem from the DotNetNuke.Security.Membership.AspNetMembershipProvider.CreateUser() method (line 874-875) in AspNetMembershipProvider.cs. This method checks the Request parameters and if it finds an oAuth "state" parameter, it prepends the state parameter to the users email to create a new Username.

This is an issue as we would like to have one canonical account per user independent of login method based off their email address. In fact this is kind of necessary as we use the DNN Users table entries to index what content the Users have bought from our site. 

I was wondering if anyone has any suggestions on how I could mitigate this problem without having to write my own membership provider class, or recompiling the core DotNetNuke DLL? 

Can I temporarily delete the oAuth cookie for the duration of the createUser call or something?

Is there any third-patry modules that might provide this functioality?

Any help or suggestions would be appreciated.

 

 

 

 
New Post
4/10/2014 5:41 AM
 

as you've noticed the facebook authentication provider (like other oauth providers, and providers such as active directory), don't simply do authentication, but are also responsible for creating the DNN user and associating them with the oauth credential/ad user etc. Whilst this usually works well, and simplifies 3rd party integration in this case the expectation is that the oauth service will form a part of the username (primarily to make it unique). We have an enhancement on our backlog at support.dnnsoftware.com to support associating with existing accounts/adding UI to allow merging of accounts, but we haven't scoped it out yet so that can't help you.

In this case I would suggest perhaps the easiest approach is to allow the account creation to go through, but use UserController.ChangeUsername to set it to the name you originally wanted.

Longer term I imagine we'll add the ability to better control this, but hopefully that is a valid workaround in the meantime


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Facebook Account AssociationFacebook Account Association


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  

What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out