GithubHelp home page GithubHelp logo

mostafatalaat770 / node-oidc-provider-prisma-adapter Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 165 KB

Prisma Adapter for Node OIDC Provider

License: MIT License

Shell 0.21% TypeScript 99.79%
adapter cockroachdb express mysql node oauth2 oidc-provider openid postgresql prisma

node-oidc-provider-prisma-adapter's Introduction

Node OIDC Provider Prisma Adapter

This is a Prisma adapter for the OIDC Provider.

Usage

This repo uses the oidc-provider app with ExpressJS as an example. You can use it with any other framework.

The database schema is defined in prisma/schema.prisma.

in order to get started, you need to copy the .env.example file to .env and fill in DATABASE_URL with your database connection string.

cp .env.example .env

change the DATABASE_URL in the .env file to your database connection string.

DATABASE_URL="postgresql://username:password@localhost:5432/database?schema=public"

Then run the following commands to start the app.

pnpm install # or npm install or yarn install

pnpm db:migrate # or npm run migrate or yarn migrate

pnpm dev # or npm run dev or yarn dev

pnpm db:studio # or npm run studio or yarn studio

Configuration

This adapter uses cockroachdb as the default database. You can change the default database by changing the provider in prisma/schema.prisma.

datasource db {
provider = "cockroachdb" # change this to your database provider
url      = env("DATABASE_URL")
}

The Prisma adapter supports the following databases:

  • PostgreSQL
  • MySQL
  • SQLite
  • SQL Server
  • MongoDB
  • CockroachDB

You can find more information about the database connection string in the Prisma docs.

Testing

This repo uses jest for testing. You can run the tests with the following command.

pnpm test # or npm run test or yarn test

License

MIT

Author

Mostafa Abouzeid

node-oidc-provider-prisma-adapter's People

Contributors

mostafatalaat770 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.