Pseudocode of the suggested workflow for performing a social login through the WS.WebTV API.
support, ws.webtv, api, users, log_in, social, login
1. Use the desired external auth provider (Social API: Facebook, Twitter, etc.) to get the User ID (and E-Mail) from the social network.
2. Once obtanied the external User ID on social network then get the User ID in the WebTV
2.1. Try getting the User ID in the WebTV, from the external auth provider info:
API: users > get_id_from_ext_auth_info
2.1.1. If the API did not return an ID then try getting the ID by using the User E-Mail provided by the social network (maybe the User registered previously in the WebTV either directly or by using another external auth provider, using that same E-Mail)
API: users > get_id_from_email
188.8.131.52. If The API returned the User ID (the User exists...) then add a new external auth provider for the User:
API: users > add_ext_auth_provider
3. Log the User in the WebTV (if the User exists) or register it (if the User does not exist).
3A: If you were able to get the User ID in the WebTV (the User exists and has the external auth provider associated) then log the user in and redirect it to the WebTV:
3A.1. Log the User in the system:
API: users > log_in (case 2: External auth provider login)
3A.2. After successful login, redirect the user to the "session_transfer_url" URL.
3B: If you could not get the User ID in the WebTV (the User does not exist) then register it:
3B.1. Register the User:
API: users > create (case 2: Registration using an external auth provider)
3B.2. After successful registration, log the user in the WebTV and redirect it (see 3A)