MCPcopy Create free account
hub / github.com/NativeScript/firebase / updateProfile

Method updateProfile

packages/firebase-auth/index.android.ts:465–493  ·  view source on GitHub ↗
(profile: UserProfileChangeRequest)

Source from the content-addressed store, hash-verified

463 }
464
465 updateProfile(profile: UserProfileChangeRequest): Promise<void> {
466 return new Promise((resolve, reject) => {
467 if (!this.native) {
468 reject();
469 } else {
470 const builder = new com.google.firebase.auth.UserProfileChangeRequest.Builder();
471 if (profile.displayName) {
472 builder.setDisplayName(profile.displayName);
473 }
474 if (profile.photoUri) {
475 try {
476 builder.setPhotoUri(android.net.Uri.parse(profile.photoUri));
477 } catch (e) {}
478 }
479 NSFirebaseAuth().User.updateProfile(
480 this.native,
481 builder.build(),
482 new org.nativescript.firebase.auth.FirebaseAuth.Callback({
483 onSuccess(success) {
484 resolve();
485 },
486 onError(error) {
487 reject(FirebaseError.fromNative(error));
488 },
489 })
490 );
491 }
492 });
493 }
494
495 verifyBeforeUpdateEmail(email: string, actionCodeSettings?: ActionCodeSettings): Promise<void> {
496 return new Promise((resolve, reject) => {

Callers

nothing calls this directly

Calls 1

updateProfileMethod · 0.65

Tested by

no test coverage detected