# \[PAID\] Extend the OAuth2 Basic Plugin

**URL:** <https://meta.discourse.org/t/paid-extend-the-oauth2-basic-plugin/111092>\
**Category:** Marketplace\
**Created:** [March 8, 2019, 3:48pm UTC](https://meta.discourse.org/t/paid-extend-the-oauth2-basic-plugin/111092 "2019-03-08T15:48:29Z")\
**Posts on this page:** 1\
**Showing post:** 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:** [March 8, 2019, 3:48pm 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.

---

_[View the full topic](https://meta.discourse.org/t/paid-extend-the-oauth2-basic-plugin/111092)._
