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

Function toUserCredential

packages/firebase-auth/index.android.ts:591–611  ·  view source on GitHub ↗
(authData: com.google.firebase.auth.AuthResult)

Source from the content-addressed store, hash-verified

589}
590
591function toUserCredential(authData: com.google.firebase.auth.AuthResult): IUserCredential {
592 const additionalUserInfo = authData.getAdditionalUserInfo();
593 const credential = authData.getCredential();
594
595 const result = {
596 additionalUserInfo: null,
597 user: User.fromNative(authData.getUser()),
598 credential: credential instanceof com.google.firebase.auth.OAuthCredential ? OAuthCredential.fromNative(credential) : AuthCredential.fromNative(credential),
599 };
600
601 if (additionalUserInfo) {
602 result.additionalUserInfo = {
603 newUser: additionalUserInfo?.isNewUser?.(),
604 providerId: additionalUserInfo?.getProviderId?.(),
605 username: additionalUserInfo?.getUsername?.(),
606 profile: deserialize(additionalUserInfo?.getProfile?.()),
607 };
608 }
609
610 return result;
611}
612
613export class ActionCodeSettings implements IActionCodeSettings {
614 _native: com.google.firebase.auth.ActionCodeSettings.Builder;

Callers 2

onSuccessMethod · 0.70
onSuccessMethod · 0.70

Calls 3

deserializeFunction · 0.90
fromNativeMethod · 0.45
isNewUserMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…