# Oauth2 with Drupal

**URL:** https://discourse.nodered.org/t/oauth2-with-drupal/59975
**Category:** General
**Tags:** security
**Created:** [17 March 2022 08:10 UTC](https://discourse.nodered.org/t/oauth2-with-drupal/59975 "2022-03-17T08:10:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![terkaa](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@terkaa](https://discourse.nodered.org/u/terkaa)
#### Post date: [17 March 2022 08:10 UTC](https://discourse.nodered.org/t/oauth2-with-drupal/59975/1 "2022-03-17T08:10:00Z")

</div>

Hi,

I would like to setup a Oauth2 client for Drupal. I have already managed to setup server on Drupal and Node-Red as client. Only problem is that after clicking "Login with" button I get bounced back to same sceen. So I still have somethingwrong with my settings.js?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/5/b56246140ed1565f351b74db1c58ed10bacbb489.png)

Tero

---

<div class="post-metadata">

### Author: ![terkaa](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@terkaa](https://discourse.nodered.org/u/terkaa)
#### Post date: [17 March 2022 08:40 UTC](https://discourse.nodered.org/t/oauth2-with-drupal/59975/2 "2022-03-17T08:40:42Z")

</div>

Hi,

Got this working by changing user section to this:

```auto
users: function(user) {
        return Promise.resolve({ username: user, permissions: "*" });
    }

```

But the /ui is still asking credentials how do I change this to Oauth too?

Tero

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [16 May 2022 08:41 UTC](https://discourse.nodered.org/t/oauth2-with-drupal/59975/3 "2022-05-16T08:41:38Z")

</div>

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