Node-oidc-provider How to store clients in database

1.3k Views Asked by At

I have a problem with node-oidc-provider.

I want the client list to be stored in the database, but I haven't found a solution.

Please help me!!!

2

There are 2 best solutions below

1
karepu On

For storing clients in the database, you can make use of below link to store the clients as well as other tokens

https://github.com/panva/node-oidc-provider/blob/main/example/adapters/contributed/sequelize.js

For creating tables, you can use below link

https://github.com/roggervalf/node-oidc-provider/tree/examples/example/migrations/sequelize

0
AudioBubble On

You can have your client definitions stored in a DB, just have your adapter for the Client model respond to the find(id) invocation.

https://github.com/panva/node-oidc-provider/blob/main/docs/README.md#clients

In addition to these clients the provider will use your adapter's find method when a non-static client_id is encountered.