I have a basic doubt.
I have come across many open source OAuth libs.But all of them are dependent on the social networks they serve.
My question is that if all OAuth library depens on the sites or if there are any OAuth libraries which are truly generic.
Thanks
TL;DR OAuth2 implementations are similar, but differ in some details. If a library was not designed for or tested with a particular server implementation – chances are it will not work with it at all. I have yet to see a library that supports more than one provider.
Long story:
While all OAuth2 implementations are similar, devil is in the detail.
For example, comparing step 1 (request code) of Facebook and Google OAuth2 protocols:
Obtaining access token is not quite compatible either:
I did not intend to put together a comprehensive list of all the deviations.
This is just some examples I’ve noticed while reading public documentation and experimenting with APIs.
VKontakte mostly uses Facebook’s quirks, but returns JSON in step 2, similar to Google.
After you’ve jumped all the hoops and obtained the access token things get even harder.
OAuth does not attempt to cover how APIs are structured or accessed, so you need completely different routines to fetch user name and email from each network.