# Error using discourse-oauth2-basic plugin with NeonCRM

**URL:** https://meta.discourse.org/t/error-using-discourse-oauth2-basic-plugin-with-neoncrm/132596
**Category:** SSO
**Tags:** oauth2
**Created:** [November 5, 2019, 12:18am UTC](https://meta.discourse.org/t/error-using-discourse-oauth2-basic-plugin-with-neoncrm/132596 "2019-11-05T00:18:43Z")
**Posts on this page:** 1
**Showing post:** 33

<div class="post-metadata">

### Author: ![Beam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/beam/32/169161_2.png) [@Beam](https://meta.discourse.org/u/Beam)
#### Post date: [February 7, 2020, 10:59pm UTC](https://meta.discourse.org/t/error-using-discourse-oauth2-basic-plugin-with-neoncrm/132596/33 "2020-02-07T22:59:44Z")

</div>

Hey Denis,

I’m using mattermost so it’s behaving differently.  
However, your info made me look more at the settings and I have it working, thanks!!

Here are my settings for mattermost as an oauth2 provider to discourse:

 ![Screenshot 2020-02-07 at 23.12.31](https://global.discourse-cdn.com/meta/original/3X/5/4/54f4ff8a2a86f1a6c2157804974a2a1a01cbc66d.png)

Settings in text for search engines:

> oauth2 client id: \<client id from mattermost oauth2 provider setup\>  
> oauth2 client secret: \<client secret from mattermost oauth2 provider setup\>  
> oauth2 authorize url: `https://chat.animalrebellion.org/oauth/authorize`  
> oauth2 token url: `https://chat.animalrebellion.org/oauth/access_token`  
> oauth2 token url method: POST  
> oauth2 callback user id path:  
> oauth2 callback user info paths  
> oauth2 fetch user details: CHECKED  
> oauth2 user json url: `https://chat.animalrebellion.org/api/v4/users/me`  
> oauth2 user json url method: GET  
> oauth2 json user id path: id  
> oauth2 json username path: username  
> oauth2 json name path: username  
> oauth2 json email path: email  
> oauth2 json email verified path: email\_verified  
> oauth2 json avatar path:  
> oauth2 email verified: CHECKED

On the mattermost side, the callback url is set as:  
`https://base.animalrebellion.org/auth/oauth2_basic/callback`

Still would like to see how to join: first\_name and last\_name into the “jason name path” as full\_name, but can live with just using the “username” or “first\_name” property.

HTH

Cheers!  
Beam

Links to resources:  
Link to plugin: [GitHub - discourse/discourse-oauth2-basic: A basic OAuth2 plugin for use with Discourse · GitHub](https://github.com/discourse/discourse-oauth2-basic)  
Link to how to install discourse plugin: [Install plugins on a self-hosted site](https://meta.discourse.org/t/install-plugins-in-discourse/19157)

---

_[View the full topic](https://meta.discourse.org/t/error-using-discourse-oauth2-basic-plugin-with-neoncrm/132596)._
