瀏覽代碼

fix(passport): ensure setupStrategyById calls are awaited for proper initialization

Ryu Sato 1 周之前
父節點
當前提交
b07712c15b
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      apps/app/src/server/crowi/index.ts

+ 6 - 6
apps/app/src/server/crowi/index.ts

@@ -482,12 +482,12 @@ class Crowi {
     this.passportService.setupSerializer();
     // setup strategies
     try {
-      this.passportService.setupStrategyById('local');
-      this.passportService.setupStrategyById('ldap');
-      this.passportService.setupStrategyById('saml');
-      this.passportService.setupStrategyById('oidc');
-      this.passportService.setupStrategyById('google');
-      this.passportService.setupStrategyById('github');
+      await this.passportService.setupStrategyById('local');
+      await this.passportService.setupStrategyById('ldap');
+      await this.passportService.setupStrategyById('saml');
+      await this.passportService.setupStrategyById('oidc');
+      await this.passportService.setupStrategyById('google');
+      await this.passportService.setupStrategyById('github');
     } catch (err) {
       logger.error(err);
     }