mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(core): mount OIDC after all middlewares (#3181)
This commit is contained in:
parent
c540fe5c60
commit
1ae64f41cb
1 changed files with 4 additions and 3 deletions
|
@ -64,9 +64,6 @@ export default class Tenant implements TenantContext {
|
|||
// Init app
|
||||
const app = new Koa();
|
||||
|
||||
const provider = initOidc(envSet, queries, libraries);
|
||||
app.use(mount('/oidc', provider.app));
|
||||
|
||||
app.use(koaLogger());
|
||||
app.use(koaErrorHandler());
|
||||
app.use(koaOIDCErrorHandler());
|
||||
|
@ -74,6 +71,10 @@ export default class Tenant implements TenantContext {
|
|||
app.use(koaConnectorErrorHandler());
|
||||
app.use(koaI18next());
|
||||
|
||||
// Mount OIDC
|
||||
const provider = initOidc(envSet, queries, libraries);
|
||||
app.use(mount('/oidc', provider.app));
|
||||
|
||||
const tenantContext: TenantContext = { id, provider, queries, libraries, modelRouters, envSet };
|
||||
// Mount APIs
|
||||
app.use(mount('/api', initApis(tenantContext)));
|
||||
|
|
Loading…
Reference in a new issue