fix(web,server): web socket auth (for web) (#4632)

This commit is contained in:
Jason Rasmussen
2023-10-24 18:07:24 -04:00
committed by GitHub
parent 3021eca8e5
commit 0fb1d33f17
5 changed files with 39 additions and 24 deletions

View File

@@ -147,7 +147,7 @@ export class AuthService {
return mapAdminSignupResponse(admin);
}
async validate(headers: IncomingHttpHeaders, params: Record<string, string>): Promise<AuthUserDto | null> {
async validate(headers: IncomingHttpHeaders, params: Record<string, string>): Promise<AuthUserDto> {
const shareKey = (headers['x-immich-share-key'] || params.key) as string;
const userToken = (headers['x-immich-user-token'] ||
params.userToken ||