diff --git a/src/auth.d.ts b/src/auth.d.ts index d0746cd60b..f17a84b675 100644 --- a/src/auth.d.ts +++ b/src/auth.d.ts @@ -704,13 +704,6 @@ export namespace admin.auth { * The date the user was created, formatted as a UTC string. */ creationTime?: string; - - /** - * The time at which the user was last active (ID token refreshed), - * formatted as a UTC Date string (eg 'Sat, 03 Feb 2001 04:05:06 GMT'). - * Null implies the user was never active. - */ - lastRefreshTime?: string|null; } /** diff --git a/src/auth/user-import-builder.ts b/src/auth/user-import-builder.ts index 3af3447646..852f7740ce 100755 --- a/src/auth/user-import-builder.ts +++ b/src/auth/user-import-builder.ts @@ -47,6 +47,19 @@ interface SecondFactor { factorId: string; } +interface UserProviderRequest { + uid: string; + displayName?: string; + email?: string; + phoneNumber?: string; + photoURL?: string; + providerId: string; +} + +interface UserMetadataRequest { + lastSignInTime?: string; + creationTime?: string; +} /** User import record as accepted from developer. */ export interface UserImportRecord { @@ -57,17 +70,8 @@ export interface UserImportRecord { phoneNumber?: string; photoURL?: string; disabled?: boolean; - metadata?: { - lastSignInTime?: string; - creationTime?: string; - }; - providerData?: Array<{ - uid: string; - displayName?: string; - email?: string; - photoURL?: string; - providerId: string; - }>; + metadata?: UserMetadataRequest; + providerData?: Array; multiFactor?: { enrolledFactors: SecondFactor[]; }; diff --git a/test/integration/auth.spec.ts b/test/integration/auth.spec.ts index 2797965e9b..2c5fe0e868 100755 --- a/test/integration/auth.spec.ts +++ b/test/integration/auth.spec.ts @@ -239,7 +239,6 @@ describe('admin.auth', () => { metadata: { lastSignInTime: 'Thu, 01 Jan 1970 00:00:00 UTC', creationTime: 'Thu, 01 Jan 1970 00:00:00 UTC', - lastRefreshTime: null, }, providerData: [{ displayName: 'User Four',