Tuesday, June 28, 2016

Does github (twitter, stripe & co) uses oauth for its own login?

Leave a Comment

Does github (twitter, stripe & co) uses OAuth for its own signin/signup forms?

All those authentications are cookie based, so is this regular web client basic auth or does it use some form of OAuth or xAuth ?

On login, a call to https://github.com/session (or https://twitter.com/sessions or https://dashboard.stripe.com/ajax/sessions) is made (with credentials given as formdata) that result in a 302 (or 200 for stripe) with Set-Cookie and a location to https://github.com (or https://twitter.com).

It does not seems that they use a client_id to get a code and exchange it with a token. All the OAuth dance seems striped. And the Bearer header too. So, what's going on here?

Thanks.

1 Answers

Answers 1

OAuth is a three-legged system, two-legs is sort of useless. The whole point of using OAuth is to give other services the ability to perform actions as you without needing to to specify authenticate or pass the data yourself. In the end you must still authenticate against some Auth service.

Since you are using these services as the Authentication mechanism for other sites, it wouldn't make sense to attempt to use it in your own. As part of setting OAuth, the second site redirects to the first and asked to authenticate there, which means you literally need to enter your credentials. Which means that if you are okay entering your credentials into say github, having a different authentication mechanism is useless.

OAuth allows non-github to create user accounts by trusting github with the authentication, or it allows non-github sites to make changes to github as the user once the user agrees to the interaction by logging into github to accept that policy (logging in using their credentials).

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment