0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

Require PKCE

This commit is contained in:
Gao Sun 2021-06-21 22:44:37 +08:00
parent d3287976cc
commit 2e79dd3d16
No known key found for this signature in database
GPG key ID: 0F0EFA2E36639F31

View file

@ -9,16 +9,17 @@ const app = new Koa();
const PORT = 3000;
const oidc = new Provider(`http://localhost:${PORT}/oidc`, {
pkce: {
methods: ['S256'],
required: () => false,
cookies: {
// V2: Rotate this when necessary
// https://github.com/panva/node-oidc-provider/blob/main/docs/README.md#cookieskeys
keys: ['LOGTOSEKRIT1'],
},
clients: [
{
client_id: 'foo',
client_secret: 'bar',
redirect_uris: ['http://localhost:3000/callback'],
grant_types: ['authorization_code'],
grant_types: ['authorization_code', 'refresh_token'],
token_endpoint_auth_method: 'none',
},
],
findAccount: (ctx, sub) => {