[auth] Add metadata support

This commit is contained in:
Chris Bianca
2018-01-19 16:19:08 +00:00
parent 3f0087c24d
commit 9396b4fb31
5 changed files with 40 additions and 12 deletions

View File

@@ -6,13 +6,14 @@ import INTERNALS from '../../utils/internals';
import { getNativeModule } from '../../utils/native';
import type Auth from './';
import type { ActionCodeSettings, AuthCredential } from '../../types';
import type { ActionCodeSettings, AuthCredential, UserMetadata } from '../../types';
type NativeUser = {
displayName?: string,
email?: string,
emailVerified?: boolean,
isAnonymous?: boolean,
metadata: UserMetadata,
phoneNumber?: string,
photoURL?: string,
providerData: UserInfo[],
@@ -68,6 +69,10 @@ export default class User {
return this._user.isAnonymous || false;
}
get metadata(): UserMetadata {
return this._user.metadata;
}
get phoneNumber(): ?string {
return this._user.phoneNumber || null;
}