Skip to content

Instantly share code, notes, and snippets.

View pReya's full-sized avatar
🧐
Trying to commit to more open source projects

Moritz Stückler pReya

🧐
Trying to commit to more open source projects
View GitHub Profile
@pReya
pReya / nextcloud-node-red-oauth.md
Last active February 13, 2025 23:57
Use Nextcloud as Authentication Provider for Node-RED via `passport-oauth2`.

Use Nextcloud as Authentication Provider for Node-RED

When I tried to use Nextcloud as an Auth Provider for Node-RED, I was not able to find good documentation on this topic, so I am summarizing my experience here. This was tested with Nextcloud 29.0.9 and Node-RED v4.0.5.

Preparations

  1. Create a new OAuth client in your Nextcloud by going to Administration Settings -> Security (pick the lower menu option under the Administration title – not your personal Security settings). Scroll down to OAuth 2.0 clients and add a new one (pick a descriptive name and put down the URL of your Node-RED instance followed by /auth/strategy/callback(e.g. https://node-red.mydomain.de/auth/strategy/callback)
    • Add a new client and pick a descriptive title
    • For Redirection URIput down the URL of your Node-RED instance followed by /auth/strategy/callback(e.g. https://node-red.mydomain.de/auth/strategy/callback)
  • Write down the values for Client Identifier and Secret key somewhere