(authData: com.google.firebase.auth.AuthResult)
| 589 | } |
| 590 | |
| 591 | function 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 | |
| 613 | export class ActionCodeSettings implements IActionCodeSettings { |
| 614 | _native: com.google.firebase.auth.ActionCodeSettings.Builder; |
no test coverage detected
searching dependent graphs…