Hi all,
I will like to create a simple asp.net web application whereby user can register via facebook and login via facebook account
When user click register with facebook account button, user will be brought to the web app registration page where certain information such as name, gender and etc.. will be auto populated base on the facebook account logged in on the computer (the web application
will retrieve the personal data from the user facebook account).
*password field will not be not be required on the registration page.
When user fill up the necessary information on the registration page and click submit, user registration using facebook account will be successful.
After successful registration, user can click on the login via facebook button on the login page and will be logged into the web application.
*user need to be logged into facebook in order to login to the web application successfully, if not, it will popup a facebook login window to ask user to login with his/her facebook credential.
Below website is an example of such facebook login:
https://members.myactivesg.com/auth
How am I suppose to do it?
Please advice and provide some guidelines to do this. Thank you.
Hello,
ASP.NET Web Pages includes support for OAuth and OpenID providers. Using these providers, you can let users log into your site using their existing credentials
from Facebook, Twitter, Microsoft, and Google.
Have a look at the following link:
http://www.asp.net/web-pages/overview/security/enabling-login-from-external-sites-in-an-aspnet-web-pages-site
Install the starter site template and all that is already included.
Hi ayan and wavemaster. thanks for reply.
I have tried and The facebook login is working on the template site.
However, what I want for my website is
- User have to first register with their facebook account on my website in order to login with their facebook account on my website
- When user click ‘Register using Facebook’, if user is not logged in to facebook, a facebook login pop up and require user to login with the facebook credential. After which, it will go to my registration page of my website and some basic info such as full
name, gender and date of birth is extracted from the user facebook account and populated onto the registration page fields. *The registration page will not have a password field, since user will login with their facebook account/credential. - Once user submit registration, a record of user credential will be added into my database UserCredential table
- The user Credential table consist of username, password, login type( 1 (Normal login), 2 (Facebook) or 3 (Google)) and some other user info.
- so if user register via facebook, the password attribute will be empty in the user record in the user credential database table..
Below is an example of how I want my site to work.
https://members.myactivesg.com/auth?redirect=%2Fprofile
sorry but can anyone help me?