mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: enum casing (#19946)
This commit is contained in:
parent
920d7de349
commit
e73abe0762
174 changed files with 2675 additions and 2459 deletions
|
|
@ -41,8 +41,8 @@ export class OAuthController {
|
|||
{
|
||||
isSecure: loginDetails.isSecure,
|
||||
values: [
|
||||
{ key: ImmichCookie.OAUTH_STATE, value: state },
|
||||
{ key: ImmichCookie.OAUTH_CODE_VERIFIER, value: codeVerifier },
|
||||
{ key: ImmichCookie.OAuthState, value: state },
|
||||
{ key: ImmichCookie.OAuthCodeVerifier, value: codeVerifier },
|
||||
],
|
||||
},
|
||||
);
|
||||
|
|
@ -56,14 +56,14 @@ export class OAuthController {
|
|||
@GetLoginDetails() loginDetails: LoginDetails,
|
||||
): Promise<LoginResponseDto> {
|
||||
const body = await this.service.callback(dto, request.headers, loginDetails);
|
||||
res.clearCookie(ImmichCookie.OAUTH_STATE);
|
||||
res.clearCookie(ImmichCookie.OAUTH_CODE_VERIFIER);
|
||||
res.clearCookie(ImmichCookie.OAuthState);
|
||||
res.clearCookie(ImmichCookie.OAuthCodeVerifier);
|
||||
return respondWithCookie(res, body, {
|
||||
isSecure: loginDetails.isSecure,
|
||||
values: [
|
||||
{ key: ImmichCookie.ACCESS_TOKEN, value: body.accessToken },
|
||||
{ key: ImmichCookie.AUTH_TYPE, value: AuthType.OAUTH },
|
||||
{ key: ImmichCookie.IS_AUTHENTICATED, value: 'true' },
|
||||
{ key: ImmichCookie.AccessToken, value: body.accessToken },
|
||||
{ key: ImmichCookie.AuthType, value: AuthType.OAuth },
|
||||
{ key: ImmichCookie.IsAuthenticated, value: 'true' },
|
||||
],
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue