Skip to content

Fix a couple of parity issues for auth-exp #3878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 1, 2020
Merged

Conversation

sam-gc
Copy link
Contributor

@sam-gc sam-gc commented Oct 1, 2020

  • State change listeners before initialization completes now fire after initialization is done
  • Deserializing user objects now does not care if the a value is null or undefined

b/169870894
b/169870246

@changeset-bot
Copy link

changeset-bot bot commented Oct 1, 2020

⚠️ No Changeset found

Latest commit: 97d16c8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

Binary Size Report

Affected SDKs

No changes between base commit (332c36c) and head commit (45226ad).

Test Logs

@@ -219,20 +219,20 @@ export class UserImpl implements User {
}

static _fromJSON(auth: Auth, object: PersistedBlob): User {
const displayName = object.displayName ?? undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you wanna test at least one of these with null/undefined?

Copy link
Contributor

@avolkovi avolkovi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice and clean ✨

@avolkovi avolkovi assigned sam-gc and Feiyang1 and unassigned avolkovi Oct 1, 2020
@google-oss-bot
Copy link
Contributor

Size Analysis Report

Affected Products

@firebase/auth-exp

  • ActionCodeURL

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.3 kB 44.7 kB +440 B (+1.0%)
    size_with_ext_deps 54.9 kB 55.4 kB +441 B (+0.8%)
  • AuthCredential

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.6 kB 44.0 kB +440 B (+1.0%)
    size_with_ext_deps 54.2 kB 54.6 kB +441 B (+0.8%)
  • EmailAuthCredential

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 45.3 kB 45.8 kB +440 B (+1.0%)
    size_with_ext_deps 56.0 kB 56.4 kB +441 B (+0.8%)
  • EmailAuthProvider

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.7 kB 47.1 kB +440 B (+0.9%)
    size_with_ext_deps 57.3 kB 57.8 kB +441 B (+0.8%)
  • FacebookAuthProvider

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.7 kB 47.1 kB +440 B (+0.9%)
    size_with_ext_deps 57.3 kB 57.8 kB +441 B (+0.8%)
  • GithubAuthProvider

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.7 kB 47.1 kB +440 B (+0.9%)
    size_with_ext_deps 57.3 kB 57.8 kB +441 B (+0.8%)
  • GoogleAuthProvider

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.7 kB 47.1 kB +440 B (+0.9%)
    size_with_ext_deps 57.3 kB 57.8 kB +441 B (+0.8%)
  • OAuthCredential

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 45.4 kB 45.8 kB +440 B (+1.0%)
    size_with_ext_deps 56.0 kB 56.4 kB +441 B (+0.8%)
  • OAuthProvider

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.1 kB 46.5 kB +440 B (+1.0%)
    size_with_ext_deps 56.7 kB 57.1 kB +441 B (+0.8%)
  • PhoneAuthCredential

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 45.3 kB 45.7 kB +440 B (+1.0%)
    size_with_ext_deps 55.9 kB 56.4 kB +441 B (+0.8%)
  • PhoneAuthProvider

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 47.0 kB 47.5 kB +440 B (+0.9%)
    size_with_ext_deps 57.7 kB 58.1 kB +441 B (+0.8%)
  • PhoneMultiFactorGenerator

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.2 kB 44.7 kB +440 B (+1.0%)
    size_with_ext_deps 54.9 kB 55.3 kB +441 B (+0.8%)
  • RecaptchaVerifier

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 49.8 kB 50.2 kB +440 B (+0.9%)
    size_with_ext_deps 60.4 kB 60.8 kB +441 B (+0.7%)
  • TwitterAuthProvider

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.7 kB 47.1 kB +440 B (+0.9%)
    size_with_ext_deps 57.3 kB 57.8 kB +441 B (+0.8%)
  • applyActionCode

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.4 kB 43.9 kB +440 B (+1.0%)
    size_with_ext_deps 54.0 kB 54.5 kB +441 B (+0.8%)
  • browserLocalPersistence

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.2 kB 46.7 kB +440 B (+1.0%)
    size_with_ext_deps 56.9 kB 57.4 kB +441 B (+0.8%)
  • browserPopupRedirectResolver

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 55.2 kB 55.6 kB +440 B (+0.8%)
    size_with_ext_deps 65.9 kB 66.4 kB +441 B (+0.7%)
  • browserSessionPersistence

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.0 kB 44.4 kB +440 B (+1.0%)
    size_with_ext_deps 54.6 kB 55.0 kB +441 B (+0.8%)
  • checkActionCode

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.4 kB 44.9 kB +440 B (+1.0%)
    size_with_ext_deps 55.1 kB 55.5 kB +441 B (+0.8%)
  • confirmPasswordReset

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.4 kB 43.9 kB +440 B (+1.0%)
    size_with_ext_deps 54.1 kB 54.5 kB +441 B (+0.8%)
  • createUserWithEmailAndPassword

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.3 kB 44.8 kB +440 B (+1.0%)
    size_with_ext_deps 55.0 kB 55.4 kB +441 B (+0.8%)
  • deleteUser

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.3 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 54.0 kB 54.4 kB +441 B (+0.8%)
  • fetchSignInMethodsForEmail

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.6 kB 44.1 kB +440 B (+1.0%)
    size_with_ext_deps 54.3 kB 54.7 kB +441 B (+0.8%)
  • getAdditionalUserInfo

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.6 kB 45.0 kB +440 B (+1.0%)
    size_with_ext_deps 55.2 kB 55.6 kB +441 B (+0.8%)
  • getAuth

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 61.0 kB 61.4 kB +440 B (+0.7%)
    size_with_ext_deps 72.4 kB 72.9 kB +441 B (+0.6%)
  • getIdToken

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.4 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 54.0 kB 54.4 kB +441 B (+0.8%)
  • getIdTokenResult

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.3 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 53.9 kB 54.4 kB +441 B (+0.8%)
  • getMultiFactorResolver

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.2 kB 46.6 kB +440 B (+1.0%)
    size_with_ext_deps 56.8 kB 57.3 kB +441 B (+0.8%)
  • getRedirectResult

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 48.6 kB 49.1 kB +440 B (+0.9%)
    size_with_ext_deps 59.3 kB 59.7 kB +441 B (+0.7%)
  • inMemoryPersistence

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.3 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 53.9 kB 54.4 kB +441 B (+0.8%)
  • indexedDBLocalPersistence

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.4 kB 46.8 kB +440 B (+0.9%)
    size_with_ext_deps 57.0 kB 57.4 kB +441 B (+0.8%)
  • initializeAuth

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.6 kB 44.1 kB +440 B (+1.0%)
    size_with_ext_deps 54.9 kB 55.3 kB +441 B (+0.8%)
  • isSignInWithEmailLink

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.4 kB 44.8 kB +440 B (+1.0%)
    size_with_ext_deps 55.0 kB 55.5 kB +441 B (+0.8%)
  • linkWithCredential

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.4 kB 44.8 kB +440 B (+1.0%)
    size_with_ext_deps 55.0 kB 55.4 kB +441 B (+0.8%)
  • linkWithPhoneNumber

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 47.9 kB 48.3 kB +440 B (+0.9%)
    size_with_ext_deps 58.5 kB 59.0 kB +441 B (+0.8%)
  • linkWithPopup

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 51.7 kB 52.1 kB +440 B (+0.9%)
    size_with_ext_deps 62.3 kB 62.8 kB +441 B (+0.7%)
  • linkWithRedirect

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.7 kB 47.2 kB +440 B (+0.9%)
    size_with_ext_deps 57.4 kB 57.8 kB +441 B (+0.8%)
  • multiFactor

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 45.4 kB 45.8 kB +440 B (+1.0%)
    size_with_ext_deps 56.0 kB 56.5 kB +441 B (+0.8%)
  • onAuthStateChanged

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.4 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 54.0 kB 54.4 kB +441 B (+0.8%)
  • onIdTokenChanged

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.4 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 54.0 kB 54.4 kB +441 B (+0.8%)
  • parseActionCodeURL

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.3 kB 44.8 kB +440 B (+1.0%)
    size_with_ext_deps 55.0 kB 55.4 kB +441 B (+0.8%)
  • reauthenticateWithCredential

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 45.0 kB 45.4 kB +440 B (+1.0%)
    size_with_ext_deps 55.6 kB 56.0 kB +441 B (+0.8%)
  • reauthenticateWithPhoneNumber

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 48.5 kB 48.9 kB +440 B (+0.9%)
    size_with_ext_deps 59.1 kB 59.5 kB +441 B (+0.7%)
  • reauthenticateWithPopup

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 51.7 kB 52.1 kB +440 B (+0.9%)
    size_with_ext_deps 62.3 kB 62.8 kB +441 B (+0.7%)
  • reauthenticateWithRedirect

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.5 kB 46.9 kB +440 B (+0.9%)
    size_with_ext_deps 57.1 kB 57.6 kB +441 B (+0.8%)
  • reload

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.3 kB 43.7 kB +440 B (+1.0%)
    size_with_ext_deps 53.9 kB 54.4 kB +441 B (+0.8%)
  • sendEmailVerification

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.9 kB 44.4 kB +440 B (+1.0%)
    size_with_ext_deps 54.5 kB 55.0 kB +441 B (+0.8%)
  • sendPasswordResetEmail

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.8 kB 44.3 kB +440 B (+1.0%)
    size_with_ext_deps 54.4 kB 54.9 kB +441 B (+0.8%)
  • sendSignInLinkToEmail

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.8 kB 44.3 kB +440 B (+1.0%)
    size_with_ext_deps 54.4 kB 54.9 kB +441 B (+0.8%)
  • setPersistence

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.3 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 54.0 kB 54.4 kB +441 B (+0.8%)
  • signInAnonymously

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.5 kB 44.9 kB +440 B (+1.0%)
    size_with_ext_deps 55.1 kB 55.5 kB +441 B (+0.8%)
  • signInWithCredential

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.7 kB 45.1 kB +440 B (+1.0%)
    size_with_ext_deps 55.3 kB 55.7 kB +441 B (+0.8%)
  • signInWithCustomToken

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.3 kB 44.8 kB +440 B (+1.0%)
    size_with_ext_deps 54.9 kB 55.4 kB +441 B (+0.8%)
  • signInWithEmailAndPassword

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 48.1 kB 48.6 kB +440 B (+0.9%)
    size_with_ext_deps 58.7 kB 59.2 kB +441 B (+0.8%)
  • signInWithEmailLink

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 48.3 kB 48.8 kB +440 B (+0.9%)
    size_with_ext_deps 59.0 kB 59.4 kB +441 B (+0.7%)
  • signInWithPhoneNumber

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 48.2 kB 48.6 kB +440 B (+0.9%)
    size_with_ext_deps 58.8 kB 59.2 kB +441 B (+0.8%)
  • signInWithPopup

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 51.7 kB 52.1 kB +440 B (+0.9%)
    size_with_ext_deps 62.3 kB 62.8 kB +441 B (+0.7%)
  • signInWithRedirect

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 46.2 kB 46.7 kB +440 B (+1.0%)
    size_with_ext_deps 56.8 kB 57.3 kB +441 B (+0.8%)
  • signOut

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.3 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 54.0 kB 54.4 kB +441 B (+0.8%)
  • unlink

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.9 kB 44.4 kB +440 B (+1.0%)
    size_with_ext_deps 54.5 kB 55.0 kB +441 B (+0.8%)
  • updateCurrentUser

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.4 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 54.0 kB 54.4 kB +441 B (+0.8%)
  • updateEmail

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.6 kB 44.1 kB +440 B (+1.0%)
    size_with_ext_deps 54.2 kB 54.7 kB +441 B (+0.8%)
  • updatePassword

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.6 kB 44.1 kB +440 B (+1.0%)
    size_with_ext_deps 54.2 kB 54.7 kB +441 B (+0.8%)
  • updatePhoneNumber

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.1 kB 44.5 kB +440 B (+1.0%)
    size_with_ext_deps 54.7 kB 55.1 kB +441 B (+0.8%)
  • updateProfile

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.8 kB 44.2 kB +440 B (+1.0%)
    size_with_ext_deps 54.4 kB 54.9 kB +441 B (+0.8%)
  • useDeviceLanguage

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.4 kB 43.8 kB +440 B (+1.0%)
    size_with_ext_deps 54.0 kB 54.4 kB +441 B (+0.8%)
  • verifyBeforeUpdateEmail

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 43.9 kB 44.4 kB +440 B (+1.0%)
    size_with_ext_deps 54.6 kB 55.0 kB +441 B (+0.8%)
  • verifyPasswordResetCode

    Size

    Type Base (332c36c) Head (45226ad) Diff
    size 44.5 kB 44.9 kB +440 B (+1.0%)
    size_with_ext_deps 55.1 kB 55.6 kB +441 B (+0.8%)

Test Logs

@sam-gc sam-gc merged commit eb663f2 into master Oct 1, 2020
@sam-gc sam-gc deleted the samgho/fix-state-change branch October 1, 2020 22:54
@firebase firebase locked and limited conversation to collaborators Nov 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants