I have a registration-login system on my own website yet I want to add Facebook Connect too. I have some required parts of my user table as:
Username
Password
Email
The first thing that came to my mind is, setting userId as username, userId#facebook.com as email and setting the password to null and check if a record exists with these details in my user table. If not insert a new user with these details, if exists return that user details.
Is this a good design? How should I connect facebook connect to my website?
Thank you
I would suggest you to take this into a more deep ASP.NET, and start an MVC project
then use the Microsoft Facebook API SDK to play around with the API, it's very easy and because they are using the new dynamic type, now that Facebook changed the Open Graph, it will continue to work great as well.
in your login page, add a facebook login button and ask for permissions, for example:
<fb:login-button perms="email" size="medium">
redirect-uri="http://yourdomain.com/FBLogin/"
Subscribe using Facebook</fb:login-button>
in your FBLogin controller, login the user using the FB credentials, if the user uses your normal form, use the normal login
If you create a custom MemberShip Provider, you can easily use that for both accesses... I write a simple start to a custom Membership provider here
Related
How do I get the user profile information such as user name, email id, profile picture, basically all the information that is displayed in the user card, in my Javascript client?
I do not want to use the default user card that is displayed for a signed in user while using the Google Identity Toolkit.
I cannot find this information in the official documentation. The documentation does say that we can customize the look and feel of the user card, but I could not figure out how to get the profile information, which is displayed in the user card.
I'm using my own Login and Logout buttons. I would like to handle the display of user profile information in my own way too.
My application is hosted on GAE with Java.
You can use the java server library to parse the gitkit id token and retrieve all the information you need:
https://github.com/google/identity-toolkit-java-client/tree/master/src/main/java/com/google/identitytoolkit
I am using a web site installed with Wordpress and a Mobile app that uses Parse.com to store its data.
Now I want the User Registration on either solution to automatically register a user on the other.
Example: When a new user register on the Wordpress based web site a PHP script should automatically create a User Object in Parse.com datastore - and here is the problem - WITH SAME PASSWORD!
I can easily create a user in Parse.com data store from the action hook register_user from Wordpress, but how do i transfer that same password to the new Parse.com user account, so that when the user next time log in through the Mobile app, they just use the same password as they used when registering their account in Wordpress?
The other way around, when registering as a new user in the Mobile App saving to Parse.com User Object, how can the same password be transferred to a Wordpress user account!
I realised that exchanging passwords from one database to another is not the solution, neither does OAuth solve my problem. only solution is to stick with only one database being called from both systems - at least for the account information.
how to finish off logging in with facebook account (and keep those details in membership db). I was reading around that one needs to get user's email, of course adding any email or name in txt box will not validate ... however it is possible to add it as another service after user logged in with any other method like google or so...
so how do i change the code to get user's email pulled from fb whilst using built in oauth model in .net 4.5
I want to support the following scenarios on my ASP.NET MVC website:
First time visitor wants to
register, via facebook connect. I'd
like the user to have an entry in my
user membership table - so I have
them enter a username/password
(email gets populated via facebook
connect).
Registered user returns to my
site, logged into facebook already.
I'd like my site to see they're
logged into facebook already and
auto log them into my membership
system.
Registered user returns to my
site, but is not logged into
facebook. I'd like to give them two
options: to log into my site
directly or use facebook connect.
Extra:
After a user has connected their
facebook account to my site, I'd
like to use their facebook profile
photo throughout my site where the
user has participated.
I'd also like to post a bit of text, maybe even a photo, to the user's wall (when they perform an action of course).
Couple questions:
What should I store to tie the user's id in my membership system to their facebook account? I'm assuming it would be their facebook user id.
Can this facebook C# SDK handle these scenarios?
Yes you would store their Facebook Id and Yes the API can support this.
I'm try to use drupal open id module. When i used to login using any provider id(yahoo,google,facebook..) it goes to registration page of my site. My question is how to populate details of the user to my form without additional burden to the user ?. For ex name,email-id etc. Is there any module associated with it ?
I haven't tried this, but this module sounds like it does what you want:
http://drupalmodules.com/module/openid-autoregistration
"Module allows automatic registration of (successfully logged in) OpenID users, even in case OpenID provider didn't supply data necessary for Drupal user registration (valid username and email)".