# 通过 OAuth2 限制用户创建

**URL:** https://meta.discourse.org/t/restrict-user-creation-via-oauth2/186097
**Category:** Feature
**Tags:** oauth2
**Created:** [2021年四月8日 07:51 UTC](https://meta.discourse.org/t/restrict-user-creation-via-oauth2/186097 "2021-04-08T07:51:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fpellet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fpellet/32/166923_2.png) [@fpellet](https://meta.discourse.org/u/fpellet)
#### Post date: [2021年四月8日 07:51 UTC](https://meta.discourse.org/t/restrict-user-creation-via-oauth2/186097/1 "2021-04-08T07:51:34Z")

</div>

您好，

我建议增加一个选项，如果用户没有特定角色，则拒绝其注册。该角色将作为属性以 JSON 形式传递，与其他属性一致。  
这样我就可以实现自动创建，而无需管理员手动批准或拒绝注册。  
您觉得如何？
