1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

fix: increase oauth timeout (#1155)

This commit is contained in:
Jason Rasmussen 2022-12-21 15:44:28 -05:00 committed by GitHub
parent 832692c8af
commit 7966c925ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import { ImmichConfigService } from '@app/immich-config';
import { BadRequestException, Inject, Injectable, Logger } from '@nestjs/common';
import { ClientMetadata, generators, Issuer, UserinfoResponse } from 'openid-client';
import { ClientMetadata, custom, generators, Issuer, UserinfoResponse } from 'openid-client';
import { ImmichJwtService } from '../../modules/immich-jwt/immich-jwt.service';
import { LoginResponseDto } from '../auth/response-dto/login-response.dto';
import { IUserRepository, USER_REPOSITORY } from '../user/user-repository';
@ -20,7 +20,11 @@ export class OAuthService {
private immichJwtService: ImmichJwtService,
private immichConfigService: ImmichConfigService,
@Inject(USER_REPOSITORY) private userRepository: IUserRepository,
) {}
) {
custom.setHttpOptionsDefaults({
timeout: 30000,
});
}
public async generateConfig(dto: OAuthConfigDto): Promise<OAuthConfigResponseDto> {
const config = await this.immichConfigService.getConfig();