go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44k stars 5.4k forks source link

[Feature Request] Restrict OpenID Connect Authentication Provider to specified hosted Domain #4325

Open cleverer opened 6 years ago

cleverer commented 6 years ago

Description

We would like to be able to restrict the OpenID Connect Authentication Source to a specific Domain, to only allow the users in our g suite to log in. This would be possible by implementing a check on the hd (hostedDomain) property.

https://developers.google.com/identity/work/it-apps

tvvignesh commented 5 years ago

@techknowlogick @cleverer Hi. Any updates on this? Currently we are able to register with any domain. Would like to restrict it to our org domain alone.

cleverer commented 5 years ago

@tvvignesh I don't think any progress has been made on this… I am now using the API to create users automatically instead of directly linking them to G-Suite. Also, check the last point of the doc (sudo) which seems to be necessary to achieve full functionality.