open-index/open-npm huggingface dataset:
npm package: @moreillon/prisma-auto-crud-vuetify
Description: A Vue module built with Vuetify to automatically create views for each table managed by the [Prisma Auto CRU middleware](https://github.com/maximemoreillon/prisma-auto-crud). It is also provided as a standalone Docker container.
Latest version: 1.2.1

# Prisma Auto CRUD GUI

A Vue module built with Vuetify to automatically create views for each table managed by the [Prisma Auto CRU middleware](https://github.com/maximemoreillon/prisma-auto-crud).
It is also provided as a standalone Docker container.

## Usage

### As a module in your Vue.js app

Installation using NPM:

```
npm install @moreillon/prisma-auto-crud-vuetify
```

Registering the module in src/plugins/index.js:

```
// Plugins
import { loadFonts } from "./webfontloader";
import vuetify from "./vuetify";
import router from "../router";
import prismaAutoCrudGui from "@moreillon/prisma-auto-crud-vuetify";
const apiUrl = import.meta.env.VITE_API_URL;

// WARNING: Order is important
export function registerPlugins(app) {
  loadFonts();
  app.use(vuetify);
  app.use(prismaAutoCrudGui, { router, apiUrl });
  app.use(router);
}
```

### As a Docker container

```bash
docker run -e VITE_API_URL=http://localhost:7070 -p 8080:80 moreillon/prisma-auto-crud-gui
```
npm package: @moreillon/socketio_authentication_middleware
Description: A simple authentication middleware for socketio
Latest version: 2.0.1

# Socket.io authentication middleware
A simple middleware to authenticate socket.io clients

## Usage

```javascript
const express = require('express')
const http = require('http')
const auth = require('@moreillon/socketio_authentication_middleware')
const { Server } = require("socket.io")

const port = 7000

const socketio_options = { cors: { origin: '*' } }

const app = express();
const server = http.createServer(app);
const io = new Server(server, socketio_options);


const auth_options = { url: 'https://api.authentication.example.com/v2/whoami' }
io.use( auth(auth_options))

io.on('connection', (socket) => { console.log('a user connected') })

server.listen(port, () => { console.log(`App listening on port ${port}`) })

```
npm package: @moreillon/solidstart-oidc
Description: A simple package to enable OIDC / Oauth authentication in SolidStart. Tested with Auth0.
Latest version: 0.0.24

# SolidStart OIDC

A simple package to enable OIDC / Oauth authentication in SolidStart. Tested with Auth0.

## Usage

### Installation

```
npm i @moreillon/solidstart-oidc
```

### Setup

#### Middleware

Create a middleware file `src/middleware/oidc.ts` with the following content:

```ts
import { createMiddleware } from "@solidjs/start/middleware";
import { requireLogin } from "@moreillon/solidstart-oidc";
import { type FetchEvent } from "@solidjs/start/server";
import { redirect } from "@solidjs/router";

export default createMiddleware({
  async onRequest(event: FetchEvent) {
    const url = await requireLogin(event);
    if (url) return redirect(url);
  },
});
```

Register the middleware in `app.config.ts`

```ts
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
  middleware: "./src/middleware/oidc.ts",
});
```

#### Route handlers

`src/routes/api/oauth/login.ts`

```ts
import { loginHandler } from "@moreillon/solidstart-oidc";
import { redirect } from "@solidjs/router";
import type { APIEvent } from "@solidjs/start/server";

export async function GET(event: APIEvent) {
  const href = await loginHandler(event);
  return redirect(href);
}
```

`src/routes/api/oauth/callback.ts`

```ts
import { callbackHandler } from "@moreillon/solidstart-oidc";
import { redirect } from "@solidjs/router";
import type { APIEvent } from "@solidjs/start/server";

export async function GET(event: APIEvent) {
  await callbackHandler(event);
  return redirect("/");
}
```

#### Environment variables

```.env
OIDC_SESSION_SECRET=areallylongsecretthatyoushouldreplace
OIDC_AUTHORITY=https://oidc.example.com
OIDC_CLIENT_ID=yourclientid
```
npm package: @moreillon/vue-oidc
Description: ```ts import { createApp } from "vue"; import { createPinia } from "pinia"; import { auth } from "@moreillon/vue-oidc"; import App from "./App.vue"; import router from "./router";
Latest version: 0.0.15

# Vue OIDC

## Usage example

```ts
import { createApp } from "vue";
import { createPinia } from "pinia";
import { auth } from "@moreillon/vue-oidc";
import App from "./App.vue";
import router from "./router";

const app = createApp(App);

const { VITE_OIDC_AUTHORITY, VITE_OIDC_CLIENT_ID } = import.meta.env;

app.use(auth, {
  authority: VITE_OIDC_AUTHORITY,
  client_id: VITE_OIDC_CLIENT_ID,
});
app.use(createPinia());
app.use(router);

app.mount("#app");
```

Then in your components:

```vue
<script setup lang="ts">
import { useAuth } from "@moreillon/vue-oidc";

const { user } = useAuth();
</script>

<template>
  <h1>User</h1>
  <p>
    {{ user }}
  </p>
</template>
```