mirror of
https://github.com/immich-app/immich.git
synced 2026-04-25 02:29:51 -04:00
chore: remove userEmail to email
This commit is contained in:
parent
12e36ad082
commit
e583e3c55a
@ -7,7 +7,7 @@ export async function up(db: Kysely<any>): Promise<void> {
|
||||
"token" bytea NOT NULL,
|
||||
"oauthSub" varchar NOT NULL,
|
||||
"oauthSid" varchar,
|
||||
"userEmail" varchar NOT NULL,
|
||||
"email" varchar NOT NULL,
|
||||
"expiresAt" timestamp with time zone NOT NULL,
|
||||
"createdAt" timestamp with time zone NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
@ -15,7 +15,7 @@ export class OAuthLinkTokenTable {
|
||||
oauthSid!: string | null;
|
||||
|
||||
@Column()
|
||||
userEmail!: string;
|
||||
email!: string;
|
||||
|
||||
@Column({ type: 'timestamp with time zone' })
|
||||
expiresAt!: Timestamp;
|
||||
|
||||
@ -98,7 +98,7 @@ describe(AuthService.name, () => {
|
||||
id: 'token-id',
|
||||
oauthSub: 'oauth-sub-123',
|
||||
oauthSid: null,
|
||||
userEmail: user.email,
|
||||
email: user.email,
|
||||
token: Buffer.from('hashed'),
|
||||
expiresAt: new Date(Date.now() + 600_000),
|
||||
createdAt: new Date(),
|
||||
@ -120,7 +120,7 @@ describe(AuthService.name, () => {
|
||||
id: 'token-id',
|
||||
oauthSub: 'oauth-sub-123',
|
||||
oauthSid: 'idp-sid-456',
|
||||
userEmail: user.email,
|
||||
email: user.email,
|
||||
token: Buffer.from('hashed'),
|
||||
expiresAt: new Date(Date.now() + 600_000),
|
||||
createdAt: new Date(),
|
||||
|
||||
@ -356,7 +356,7 @@ export class AuthService extends BaseService {
|
||||
token: hashedToken,
|
||||
oauthSub: profile.sub,
|
||||
oauthSid: oauthSid ?? null,
|
||||
userEmail: emailUser.email,
|
||||
email: emailUser.email,
|
||||
expiresAt: DateTime.now().plus({ minutes: 10 }).toJSDate(),
|
||||
});
|
||||
throw new OAuthLinkRequiredException(emailUser.email, plainToken);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user