mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -05:00
Require PKCE
This commit is contained in:
parent
49315edf40
commit
54210799e2
1 changed files with 6 additions and 5 deletions
|
@ -9,16 +9,17 @@ const app = new Koa();
|
||||||
const PORT = 3000;
|
const PORT = 3000;
|
||||||
|
|
||||||
const oidc = new Provider(`http://localhost:${PORT}/oidc`, {
|
const oidc = new Provider(`http://localhost:${PORT}/oidc`, {
|
||||||
pkce: {
|
cookies: {
|
||||||
methods: ['S256'],
|
// V2: Rotate this when necessary
|
||||||
required: () => false,
|
// https://github.com/panva/node-oidc-provider/blob/main/docs/README.md#cookieskeys
|
||||||
|
keys: ['LOGTOSEKRIT1'],
|
||||||
},
|
},
|
||||||
clients: [
|
clients: [
|
||||||
{
|
{
|
||||||
client_id: 'foo',
|
client_id: 'foo',
|
||||||
client_secret: 'bar',
|
|
||||||
redirect_uris: ['http://localhost:3000/callback'],
|
redirect_uris: ['http://localhost:3000/callback'],
|
||||||
grant_types: ['authorization_code'],
|
grant_types: ['authorization_code', 'refresh_token'],
|
||||||
|
token_endpoint_auth_method: 'none',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
findAccount: (ctx, sub) => {
|
findAccount: (ctx, sub) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue