Enable Google Login to accept logins from more than one hosted domain (aka GSuite domain)

Currently, the “google oauth2 hd” login setting can either be left blank (allowing login from any Gmail or GSuite/hosted domain account), can be set to * (allowing login from any GSuite/hosted domain account), or can be set to a single GSuite domain name (allowing login from accounts in one GSuite/hosted domain.) A fourth option – already supported by the underlying omniauth-google-oauth2 gem but not currently supported by Discourse – is to specify a list of hosted/GSuite domains (allowing logins from accounts in any one of the specified GSuite domains.)

In other systems, I’ve seen this done by allowing multiple domain names to be comma-delimited or space-delimited in the corresponding setting (google oauth2 hd at <discourse>/admin/site_settings/category/login.) An incomplete PR along these lines can be found at FEATURE: Allow Google Login to be enabled for multiple hosted domains. by aribn · Pull Request #6067 · discourse/discourse · GitHub

8개의 좋아요

이 기능 요청에 동의합니다. 저희 학교는 두 개의 도메인을 사용하고 있습니다. 하나는 학생용(alum.college.com), 다른 하나는 교직원용(college.com)입니다. 학생과 교직원이 모두 Google 로그인으로 저희 Discourse 포럼에 로그인할 수 있기를 바랍니다. 학생과 교직원의 이메일 주소를 분리하기 위해 이와 유사한 도메인 분할 시스템을 사용하는 대학이 많습니다.

1개의 좋아요