WorkflowOtherOpen

OIDC client workflow

Triggered by a webhook. Connects Code, Condition, HTTP request, Html, Respond To Webhook, Webhook. In this set, you have to retrieve from your identity provider : - auth url - token url - userinfo url - the client id you created for this flow - scopes to use, at least "openid" scope if you do not want to use PKCE, you have to fill : - clientsecret - redirecturi (which is the webhook uri) At this p

Front matter
name: OIDC client workflow
description: Triggered by a webhook. Connects Code, Condition, HTTP request, Html, Respond To Webhook, Webhook. In this set, you have to retrieve from your identity provider : - auth url - token url - userinfo url - the client id you created for this flow - scopes to use, at least "openid" scope if you do not want to use PKCE, you have to fill : - client_secret - redirect_uri (which is the webhook uri) At this point the user is authenticated, you have access to his profile from the user info result and you continue doing things ## Quick setup with Keycloak 1. Open your Keycloak 2. Go to `Realm settings`
category: Automation
kind: Workflow
software: Code|Condition|HTTP request|Html|Respond To Webhook|Webhook

OIDC client workflow

Triggered by a webhook. Connects Code, Condition, HTTP request, Html, Respond To Webhook, Webhook. In this set, you have to retrieve from your identity provider :

  • auth url
  • token url
  • userinfo url
  • the client id you created for this flow
  • scopes to use, at least "openid" scope

if you do not want to use PKCE, you have to fill :

  • client_secret
  • redirect_uri (which is the webhook uri) At this point the user is authenticated, you have access to his profile from the user info result and you continue doing things ## Quick setup with Keycloak
  1. Open your Keycloak
  2. Go to Realm settings

Steps

  • Webhook (webhook)
  • Code (code)
  • user info (httpRequest)
  • send back login page (respondToWebhook)
  • IF token is present (if)
  • Welcome page (html)
  • send back welcome page (respondToWebhook)
  • IF user info ok (if)
  • login form (html)
  • Sticky Note (stickyNote)
  • Sticky Note1 (stickyNote)
  • Sticky Note2 (stickyNote)
  • Set variables : auth, token, userinfo, client id, scope (set)
  • IF we have code in URI and not in PKCE mode (if)
  • get access_token from /token endpoint with code (httpRequest)

Import

Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).

Source: https://github.com/Zie619/n8n-workflows/blob/main/Code/2034_Code_Webhook_Automate_Webhook.md

Author: Zie619, n8n workflow collection. License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.