If you are building a website and need to sign people in, you can use IndieLogin.com to handle all the complicated parts.
Users will identify themselves with their website, and can authenticate using one of the download the source and run your own server.
After the user enters their domain in the sign-in form and submits, IndieLogin.com will scan their website looking for rel="me"
links from providers it knows about (see
An example error response:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error": "invalid_request", "error_description": "The code provided was not valid" }
At this point you know the website belonging to the authenticated user.
You can store the website in a secure session and log the user in as their website identity. You don't need to worry about whether they authenticated with Twitter or Github or email address, their identity is their website! You won't have to worry about merging duplicate accounts or handling error cases when Twitter is offline.