# Configure sign up and log in with Auth0 using the OAuth2 Basic Plugin

**URL:** https://meta.discourse.org/t/configure-sign-up-and-log-in-with-auth0-using-the-oauth2-basic-plugin/64633
**Category:** Integrations
**Tags:** sso, oauth2, auth-plugins, how-to
**Created:** [June 16, 2017, 8:45pm UTC](https://meta.discourse.org/t/configure-sign-up-and-log-in-with-auth0-using-the-oauth2-basic-plugin/64633 "2017-06-16T20:45:59Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [May 17, 2018, 4:01am UTC](https://meta.discourse.org/t/configure-sign-up-and-log-in-with-auth0-using-the-oauth2-basic-plugin/64633/12 "2018-05-17T04:01:54Z")

</div>

> [@sirideain](#):
>
> Hi, I tried setting this up and I do get the Auth0 button for logging in, but it isn’t filling in the fields correctly.

> [@Max\_Colvin](#):
>
> Did you find out why the fields are not being filled in?

@sirideain @Max_Colvin I’m really sorry that I’m only now addressing this, but sometime since my original post (Jun '17) and Oct '17 Auth0 made some changes to their dashboard and to the json schema that is returned.

I just pushed a fix to address this:

[https://github.com/discourse/discourse-oauth2-basic/commit/bce6e9e878c4e3843f8ba8473778cc4b0595144f](https://github.com/discourse/discourse-oauth2-basic/commit/bce6e9e878c4e3843f8ba8473778cc4b0595144f)

The json returned now looks something like this with an identities array:

```
{
        "email": "test@example.com",
        "user_id": "auth0|123456789",
        "identities":[{
                "user_id": "123456789",
                "provider": "auth0",
                "connection": "Username-Password-Authentication",
                "isSocial": false
        }]
}

```

The problem is that we can’t key off of the root `user_id` because it contains the authentication provider before the `<auth-provider>|<user_id>`, and it could be auth0, twitter, facebook, etc depending on which one the user signed-up/logged-in with, but it needs to be unique which is why we are now grabbing the `user_id` contained inside of the `identities` array.

So now inside of your discourse site settings you can configure `oauth2_json_user_id_path` to be `identities.[].user_id`

Also inside of the Auth0 dashboard when you setup a new application be sure that “Use Auth0 instead of the IdP to do Single Sign On” is turned off:

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/d/dd11385a22a4a2122a8b24fdc7d96a3366b28da3.png)

because it is now on by default, but should be off for doing oauth.

---

_[View the full topic](https://meta.discourse.org/t/configure-sign-up-and-log-in-with-auth0-using-the-oauth2-basic-plugin/64633)._
