Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1103151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:17:55+00:00 2026-05-17T01:17:55+00:00

I need to implement facebook-connect to a website where users already might have their

  • 0

I need to implement facebook-connect to a website where users already might have their internal accounts. If internal account doesn’t exist, it should be created from facebook credentials. Also it should be possible to link an existing account to facebook account. The technical implementation is clear to me, but I am more interested about a practical, optimal, and understandable user activity workflow.

1) My initial idea was to have a login form with user and password fields and two buttons: “connect with facebook” and “login”. If “login” is pressed, the internal account is normally logged in. If “connect with facebook” is pressed, the user is connected to facebook and then depending on the state of user and password, I could retrieve the internal user and bind it with facebook user, or create a new internal user and bind it to facebook user, or retrieve the internal user that is binded to the facebook user. However, there I see some gotchas in the workflow. What if the user and password entered are of a different internal user than the one that is binded to the facebook account?

I will try to illustrate the problem in pseudocode:

if "login" is pressed:
    internal_user = authenticate(username, password)

if "connect to facebook" is pressed:
    facebook_user = get_facebook_user()
    if username and password are filled in:
        internal_user = authenticate(username, password)
        if facebook_user has no internal_user:
            facebook_user.bind_internal_user(internal_user)
        else:
            # conflict! what to do with it?
            # facebook_user.get_internal_user() != internal_user
    else:
        if facebook_user has internal_user:
            internal_user = facebook_user.get_internal_user()
        else:
            internal_user = facebook_user.create_internal_user()

internal_user.login()

Also users might get confused asking themselves if they need to enter facebook username and password or the username and password of the website.

2) Another option could be to have a login form, connect to facebook, and registration form as three different options, where connect to facebook would either get or create an internal account; and then a separate optional form for logged-in users to bind their facebook accounts. But then again there would be possibilites left to create a duplicate internal account.

What are the best practices to deal with that? What are the other websites using mostly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:17:56+00:00Added an answer on May 17, 2026 at 1:17 am

    Login form:

    [username]   |
    [password]   |  or [fbconnect button] with facebook
       [ok]      |
    

    (two mutually exclusive sections “either or”, you don’t need to fill out the login form if you use facebook)

    Once a user is connected with FB and you don’t have associated user account for this uid then you popup another form:

    Welcome, 
    Please choose username for this site:
    [username] [ok] 
    (you can prompt to select a password as well if you want)
    ----------------------------------------------------
    If you already have an account on our site please enter your credentials:
    [username]
    [password]
       [ok] 
    

    After this step you should be covered – no matter which way they chose the result should be the same.

    Usually you don’t prompt for password for facebook connected users during login, they just use facebook connect button, so randomly generated password would do. If you want to create full scale account that could be used without facebook then you prompt for a password (but still don’t use it for facebook login).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to implement a Diff algorithm in VB.NET to find the changes between
I need to implement version control, even for just the developing I do at
I need to implement a 4-to-1 function in Veriog. The input is 4 bits,
I need to implement auto-capitalization inside of a Telerik RadEditor control on an ASPX
I need to implement an in-memory tuple-of-strings matching feature in C. There will be
We need to implement a simple state machine in C . Is a standard
I need to implement an OpenID Provider in .Net and wondered....Is there's any OpenSource
I need to implement some kind of metric space search in Postgres(*) (PL or
I need to implement the classic Factory Method pattern in ASP.NET to create server
I need to implement a SSO between a SharePoint site and a custom PHP-based

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.