[Users] Making auth easier: OAuth 2.0 for Google APIs
Shai Berger
shai at platonix.com
Sun Feb 4 23:35:51 CET 2018
On Sun, 4 Feb 2018 16:17:56 -0500
Jerry <jerry at seibercom.net> wrote:
> On Sun, 4 Feb 2018 21:43:51 +0100, Andrej Kacian stated:
>
> >
> >If we were to add
> >OAuth support, it would have to be implemented differently for each
> >provider (Google, Microsoft, my own mailserver if I decided to
> >implement OAuth for it, Yahoo, ...), which is utter madness.
> >
> >I'm not against having this implemented (hopefully in a plugin), but
> >I'm definitely not planning to go anywhere near it.
>
> There does appear to be a standard <https://oauth.net/2/>, although I
> am not sure how closely it is adhered to.
>
For an idea of how well this works in practice, have a look at
python-social-auth[1]. They have a special class for every supported
provider[2]. Many of these classes are trivial, taking all of their
behaviors from parent classes and adding just some constant or default
definitions. Some are less trivial.
Have fun,
Shai.
[1] http://python-social-auth.readthedocs.io/en/latest/
[2]
https://github.com/python-social-auth/social-core/tree/master/social_core/backends
More information about the Users
mailing list