mirror of https://github.com/zulip/zulip.git
auth: Fix Github auth with organization/team membership restriction.
We need to request access to read:org scope to be able to check org/team membership. Without it SOCIAL_AUTH_GITHUB_ORG_NAME and SOCIAL_AUTH_GITHUB_TEAM_ID settings don't work and simply lead to all auth attempts failing. Tested manually.
This commit is contained in:
parent
783a77c532
commit
03a6da27f1
|
@ -984,6 +984,8 @@ SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/'
|
|||
SOCIAL_AUTH_GITHUB_SECRET = get_secret('social_auth_github_secret')
|
||||
SOCIAL_AUTH_GITLAB_SECRET = get_secret('social_auth_gitlab_secret')
|
||||
SOCIAL_AUTH_GITHUB_SCOPE = ['user:email']
|
||||
if SOCIAL_AUTH_GITHUB_ORG_NAME or SOCIAL_AUTH_GITHUB_TEAM_ID:
|
||||
SOCIAL_AUTH_GITHUB_SCOPE.append("read:org")
|
||||
SOCIAL_AUTH_GITHUB_ORG_KEY = SOCIAL_AUTH_GITHUB_KEY
|
||||
SOCIAL_AUTH_GITHUB_ORG_SECRET = SOCIAL_AUTH_GITHUB_SECRET
|
||||
SOCIAL_AUTH_GITHUB_TEAM_KEY = SOCIAL_AUTH_GITHUB_KEY
|
||||
|
|
Loading…
Reference in New Issue