This package can be used to spin up an OIDC provider for local development.
npm i -D @comet/dev-oidc-provider
The name must be dev-oidc-provider.config.mts and you have to place the working directory.
Example:
import { defineConfig } from "@comet/dev-oidc-provider";
export default defineConfig({
userProvider: () => [
{
id: "1",
name: "Admin",
email: "[email protected]",
},
{
id: "2",
name: "Non-Admin",
email: "[email protected]",
},
],
client: {
client_id: "comet-demo-client",
client_secret: "secret",
redirect_uris: ["http://localhost:8000/oauth2/callback"],
post_logout_redirect_uris: ["http://localhost:8000/oauth2/sign_out?rd=%2F"],
},
});Execute npx dev-oidc-provider to start the application.
Alternatively you can add the command to your package.json as a script and call it via npm:
"scripts": {
+ "dev-oidc-provider": "dev-oidc-provider",