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

**URL:** https://meta.discourse.org/t/enable-google-login-to-accept-logins-from-more-than-one-hosted-domain-aka-gsuite-domain/91892
**Category:** Feature
**Tags:** pr-welcome
**Created:** [July 9, 2018, 3:24pm UTC](https://meta.discourse.org/t/enable-google-login-to-accept-logins-from-more-than-one-hosted-domain-aka-gsuite-domain/91892 "2018-07-09T15:24:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![aribadernatal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aribadernatal/32/527594_2.png) [@aribadernatal](https://meta.discourse.org/u/aribadernatal)
#### Post date: [July 9, 2018, 3:24pm UTC](https://meta.discourse.org/t/enable-google-login-to-accept-logins-from-more-than-one-hosted-domain-aka-gsuite-domain/91892/1 "2018-07-09T15:24:48Z")

</div>

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](https://github.com/zquestz/omniauth-google-oauth2#configuration) 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](https://github.com/discourse/discourse/pull/6067)

---

<div class="post-metadata">

### Author: ![mmcneff](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mmcneff/32/142402_2.png) [@mmcneff](https://meta.discourse.org/u/mmcneff)
#### Post date: [April 1, 2020, 11:19pm UTC](https://meta.discourse.org/t/enable-google-login-to-accept-logins-from-more-than-one-hosted-domain-aka-gsuite-domain/91892/2 "2020-04-01T23:19:30Z")

</div>

I’d like to second this feature request. Our school uses two different domains. One domain for students ([alum.college.com](http://alum.college.com)) and one for faculty/staff ([college.com](http://college.com)). We’d like for both students and faculty to be able to log in to our Discourse forum using Google login. There are many colleges using a similar split domain system to separate students and faculty/staff email addresses.
