npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-openai-browser-flow

v0.1.9

Published

Experimental browser-based OAuth flow for OpenAI usage in Node and n8n.

Readme

n8n-nodes-openai-browser-flow

Experimental Node/TypeScript community node package for n8n, with a companion local auth bridge for testing an OpenAI browser login flow and then calling the Responses API with the returned bearer token.

This package is intended for local experiments and custom n8n integrations. It now includes an actual n8n node, but it still does not guarantee that OpenAI browser login tokens are valid for https://api.openai.com/v1/responses.

What it does

  • uses the n8n OAuth2 connect button against a local auth bridge
  • lets the local bridge do the real Authorization Code + PKCE flow with OpenAI
  • sends POST /v1/responses with Authorization: Bearer <token>
  • exposes an n8n node named OpenAI Browser Flow

Install

npm install n8n-nodes-openai-browser-flow

Basic usage

import { OpenAIBrowserFlowClient } from 'n8n-nodes-openai-browser-flow';

const client = new OpenAIBrowserFlowClient({
  clientId: 'YOUR_CLIENT_ID',
  clientSecret: 'OPTIONAL_CLIENT_SECRET',
  authorizationEndpoint: 'https://auth.openai.com/authorize',
  tokenEndpoint: 'https://auth0.openai.com/oauth/token',
  scopes: ['openid', 'profile', 'offline_access'],
  audience: 'https://api.openai.com',
  redirectHost: '127.0.0.1',
  redirectPort: 3456,
  redirectPath: '/callback',
});

await client.authenticate();

const response = await client.createResponse({
  model: 'gpt-4.1-mini',
  input: 'Diga oi em portugues.',
});

console.log(response.outputText);

n8n usage

After installing the package as a community node, n8n should load:

  • a credential type named OpenAI Browser Flow API
  • a node named OpenAI Browser Flow

The node exposes two operations:

  • Create Response: calls the OpenAI Responses API

The credential uses the standard n8n OAuth2 connection flow, but it is expected to point to a local bridge server instead of OpenAI directly.

Local bridge

A companion Flask bridge is expected at:

  • /home/gabrieldossantospeixoto/Documentos/GitHub/PESSOAL/openai-auth-bridge

Run that bridge first, then configure the credential with:

  • Authorization URL: http://localhost:1455/oauth/authorize
  • Access Token URL: http://localhost:1455/oauth/token
  • App ID: your OpenAI app_... id
  • Client Secret: hidden and empty by default

The bridge completes the real OpenAI login on http://localhost:1455/openai/callback and hands the resulting token payload back to n8n.

The reusable library can also be used by:

  • an internal helper package used by a node
  • a Code node, if the runtime allows loading external packages

Important limitations

  • browser/OAuth support for OpenAI API access is not validated by this package
  • the returned token may be valid only for identity, not for v1/responses
  • OpenAI may require a different audience, scope, redirect, or app registration flow
  • this package now expects the OAuth connection to be completed through the n8n credential UI backed by the local Flask bridge

API

new OpenAIBrowserFlowClient(config)

Config fields:

  • clientId: OAuth client id
  • clientSecret: optional client secret
  • authorizationEndpoint: defaults to https://auth.openai.com/authorize
  • tokenEndpoint: defaults to https://auth0.openai.com/oauth/token
  • scopes: defaults to openid profile offline_access
  • audience: optional audience
  • redirectHost: defaults to 127.0.0.1
  • redirectPort: defaults to 3456
  • redirectPath: defaults to /callback
  • openBrowser: defaults to true
  • callbackTimeoutMs: defaults to 5 minutes
  • apiBaseUrl: defaults to https://api.openai.com/v1

Methods:

  • authenticate()
  • setAccessToken(accessToken)
  • createResponse(request)

Bridge repository

The local bridge repository lives at:

  • /home/gabrieldossantospeixoto/Documentos/GitHub/PESSOAL/openai-auth-bridge