AngularOAuth2.0timeoutFactorisnotconsidered
创始人
2024-10-28 19:00:39
0

在使用Angular OAuth 2.0时,timeoutFactor参数可能不起作用。可以通过手动设置timeout参数来解决这个问题。以下是代码示例:

import { OAuthModule } from 'angular-oauth2-oidc';
import { JwksValidationHandler } from 'angular-oauth2-oidc';
import { AuthConfig } from 'angular-oauth2-oidc';

export function authConfigFactory(): AuthConfig {
  return {
    // ...
    timeoutFactor: 0.25, // This value may not work
    timeout: 2500, // Manually set timeout to 2.5 seconds
    // ...
  };
}

@NgModule({
  imports: [
    // ...
    OAuthModule.forRoot({
      // ...
      timeoutFactor: 0.25, // This value may not work
      timeout: 2500, // Manually set timeout to 2.5 seconds
      // ...
      configFactory: authConfigFactory, // Use the above config factory
    }),
    // ...
  ],
})
export class AppModule {}

在上面的代码中,我们手动设置了timeout参数为2500毫秒,将timeoutFactor设置为了0.25。同时,我们也使用了configFactory来设置OAuth配置,以确保timeout参数生效。

相关内容

热门资讯

透视模块!pokemmo手机版... 透视模块!pokemmo手机版透视脚本(透视)pokemmo辅助器脚本下载(辅助)本来一直总是有攻略...
透视法门!拱趴大菠萝十三水作必... 透视法门!拱趴大菠萝十三水作必弊(透视)xpoker辅助工具(辅助)一直存在有神器(哔哩哔哩)1、拱...
透视秘籍!哈糖大菠萝软件下载(... 透视秘籍!哈糖大菠萝软件下载(透视)xpoker怎么作必弊(辅助)总是有神器(哔哩哔哩)1、每一步都...
透视攻略!epoker透视(透... 透视攻略!epoker透视(透视)德州私人局脚本(辅助)切实一直都是有方法(哔哩哔哩)1、德州私人局...
透视方针!哈糖大菠萝破解器(透... 透视方针!哈糖大菠萝破解器(透视)pokemmo手机脚本(辅助)一贯真的是有方法(哔哩哔哩)1、游戏...
透视教程书!哈糖大菠萝怎么开挂... 透视教程书!哈糖大菠萝怎么开挂(透视)德州之星扫描器(辅助)确实是真的有神器(哔哩哔哩)1、游戏颠覆...
透视策略!来玩app破解(透视... 透视策略!来玩app破解(透视)pokermaster修改器(辅助)其实真的有app(哔哩哔哩)一、...
透视妙计!pokernow辅助... 您好,pokernow辅助控制这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302...
透视方案!hh poker插件... 透视方案!hh poker插件下载(HHpoker开挂)一贯真的有辅助app(哔哩哔哩)1、让任何用...
透视方式!竞技联盟辅助(透视)... 透视方式!竞技联盟辅助(透视)红龙poker辅助器免费观看(辅助)一贯是真的有攻略(哔哩哔哩)1、许...