MCPcopy Index your code
hub / github.com/NativeScript/firebase / User

Class User

packages/firebase-auth/index.android.ts:127–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127export class User implements IUser {
128 _native: com.google.firebase.auth.FirebaseUser;
129 get native() {
130 return this._native;
131 }
132
133 get android() {
134 return this.native;
135 }
136
137 static fromNative(user: com.google.firebase.auth.FirebaseUser) {
138 if (user instanceof com.google.firebase.auth.FirebaseUser) {
139 const usr = new User();
140 usr._native = user;
141 return usr;
142 }
143 return null;
144 }
145
146 get displayName(): string {
147 return this.native?.getDisplayName?.();
148 }
149
150 get anonymous() {
151 return this.native?.isAnonymous?.();
152 }
153
154 get emailVerified(): boolean {
155 return this.native?.isEmailVerified?.();
156 }
157
158 get email(): string {
159 return this.native?.getEmail?.();
160 }
161
162 get uid(): string {
163 return this.native?.getUid?.();
164 }
165
166 get phoneNumber(): string {
167 return this.native?.getPhoneNumber?.();
168 }
169
170 get providerId(): string {
171 return this.native?.getProviderId?.();
172 }
173
174 get photoURL(): string {
175 let url;
176 try {
177 url = this.native?.getPhotoUrl()?.toString?.();
178 } catch (e) {}
179 return url;
180 }
181
182 get metadata(): UserMetadata {
183 return UserMetadata.fromNative(this.native?.getMetadata?.());
184 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…