auth: Migrate google auth to python-social-auth.

This replaces the two custom Google authentication backends originally
written in 2012 with using the shared python-social-auth codebase that
we already use for the GitHub authentication backend.  These are:

* GoogleMobileOauth2Backend, the ancient code path for mobile
  authentication last used by the EOL original Zulip Android app.

* The `finish_google_oauth2` code path in zerver/views/auth.py, which
  was the webapp (and modern mobile app) Google authentication code
  path.

This change doesn't fix any known bugs; its main benefit is that we
get to remove hundreds of lines of security-sensitive semi-duplicated
code, replacing it with a widely trusted, high quality third-party
library.
This commit is contained in:
Harshit Bansal
2019-02-02 15:51:26 +00:00
committed by Tim Abbott
parent 5fc37c5f9b
commit bf14a0af4d
22 changed files with 146 additions and 732 deletions

View File

@@ -43,7 +43,7 @@ AUTHENTICATION_BACKENDS = (
'zproject.backends.DevAuthBackend',
'zproject.backends.EmailAuthBackend',
'zproject.backends.GitHubAuthBackend',
'zproject.backends.GoogleMobileOauth2Backend',
'zproject.backends.GoogleAuthBackend',
# 'zproject.backends.AzureADAuthBackend',
)