# \[付费\] 扩展 OAuth2 基础插件

**URL:** <https://meta.discourse.org/t/paid-extend-the-oauth2-basic-plugin/111092>\
**Category:** Marketplace\
**Created:** [2019年三月8日 15:48 UTC](https://meta.discourse.org/t/paid-extend-the-oauth2-basic-plugin/111092 "2019-03-08T15:48:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyh](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@andyh](https://meta.discourse.org/u/andyh)\
**Post date:** [2019年三月8日 15:48 UTC](https://meta.discourse.org/t/paid-extend-the-oauth2-basic-plugin/111092/1 "2019-03-08T15:48:29Z")

</div>

We’re using the [Discourse Oauth2 Basic](https://github.com/discourse/discourse-oauth2-basic) plugin to do SSO via our API, we’d like to add functionality and we think it might be useful to other sites too.

**Context:**  
During the **account create** process, once an OAuth2 token is obtained the plugin [retrieves account data like email and uuid](https://github.com/discourse/discourse-oauth2-basic#part-2-configuring-the-json-user-endpoint) from an API endpoint `oauth2_user_json_url` the admin specifies in Discourse.

As far as I can tell though, the `oauth2_user_json_url` endpoint is only contacted once during sign-up.

**Features Requested:**

- **Add a user data attribute to pull from `oauth2_user_json_url`: email\_verified** - Admins tell the plugin where to look for email, full name, user id, username and avatar in the oauth2\_user\_json\_url response, we’d like to also specify an `email_verified` boolean field meant to indicate whether a user has confirmed their account at the OAuth2 provider.

- **Add option to continue to check `oauth2_user_json_url` after sign-up**  
Here are three scenarios where this would be useful:

There are a couple other admin options that would be required along with this, like preventing a user from changing their email in Discourse and allowing admins to specify a URL to send users to where they can change their email at the OAuth2 provider.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2019年四月7日 15:48 UTC](https://meta.discourse.org/t/paid-extend-the-oauth2-basic-plugin/111092/2 "2019-04-07T15:48:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
