This Node.js project serves as an OpenID Connect (OIDC) provider and is designed to validate users against Cloudflare Access cookies. The OIDC provider allows you to use Cloudflare Access for authentication and authorization in your application, making it easy to secure your resources and services.
To get started with this OIDC provider, follow the steps below.
Before you begin, make sure you have the following prerequisites installed:
- Node.js (version 14 or higher)
- npm (Node Package Manager)
- A Cloudflare Access account and a valid Cloudflare Access configuration.
-
Clone the repository to your local machine:
git clone https://github.com/esoadamo/cloudflare-oidc-proxy.git cd cloudflare-oidc-proxy
-
Install the project's dependencies:
npm install
Before running the OIDC provider, you need to configure it properly. Configuration examples are available under config
directory. Crate copy of all example files while removing .example
from their names.
Next, setup a Cloudlare Access configuration where only /protected/
path requires authentication, otherwise other services won't be able to access your OIDC proxy.
To start the OIDC provider, use the following command:
npm start
This will start the OIDC provider on http://localhost:3000
by default.
If you'd like to contribute to this project, feel free to open issues, submit pull requests, or provide feedback. We welcome contributions from the community.
This project is licensed under the MIT License. See the LICENSE file for details.