mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-23 03:59:18 +08:00
[auth] Add metadata support
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user