From 04449014305ffc4b870bb3d5889a5fda3e7fd9ec Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Tue, 29 Jun 2021 22:58:59 +0800 Subject: [PATCH] Enable token revocation and OIDC CORS --- packages/core/src/init/oidc.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/core/src/init/oidc.ts b/packages/core/src/init/oidc.ts index 0fce1a99e..bed682333 100644 --- a/packages/core/src/init/oidc.ts +++ b/packages/core/src/init/oidc.ts @@ -33,6 +33,11 @@ export default async function initOidc(app: Koa, port: number): Promise { token_endpoint_auth_method: 'none', }, ], + features: { revocation: { enabled: true } }, + clientBasedCORS: (ctx, origin) => { + console.log('rogin', origin); + return origin.startsWith('http://localhost:3000'); + }, findAccount: (ctx, sub) => { console.log('finding account'); return {