Skip to content

[Auth] Fix an issue with the UI interop #4688

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 4 commits into from
Mar 31, 2021
Merged

[Auth] Fix an issue with the UI interop #4688

merged 4 commits into from
Mar 31, 2021

Conversation

sam-gc
Copy link
Contributor

@sam-gc sam-gc commented Mar 30, 2021

The Closure SDK makes sure the user belongs to the project by checking the API key on the user and the auth object. We don't store the API key on the user in the new SDK so we were checking this using the app name. But it's a perfectly valid use case to pass users between apps on the same project, so this check was wrong.

This PR also removes an unused rollup plugin that was breaking the compat demo build.

@sam-gc sam-gc requested a review from yuchenshi March 30, 2021 16:40
@sam-gc sam-gc requested a review from avolkovi as a code owner March 30, 2021 16:40
@changeset-bot
Copy link

changeset-bot bot commented Mar 30, 2021

⚠️ No Changeset found

Latest commit: 2d2ca32

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@sam-gc sam-gc changed the title Fix an issue with the UI interop [Auth] Fix an issue with the UI interop Mar 30, 2021
@google-oss-bot
Copy link
Contributor

Size Analysis Report

Affected Products

  • @firebase/auth-exp

    • ActionCodeURL

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.8 kB
      29.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.8 kB
      40.7 kB
      -54 B (-0.1%)
    • AuthCredential

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.0 kB
      28.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.7 kB
      39.7 kB
      -54 B (-0.1%)
    • EmailAuthCredential

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.8 kB
      30.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      41.6 kB
      41.6 kB
      -54 B (-0.1%)
    • EmailAuthProvider

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      32.3 kB
      32.2 kB
      -53 B (-0.2%)
      size-with-ext-deps
      43.3 kB
      43.3 kB
      -54 B (-0.1%)
    • FacebookAuthProvider

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      31.9 kB
      31.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      42.7 kB
      42.6 kB
      -54 B (-0.1%)
    • GithubAuthProvider

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      31.9 kB
      31.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      42.7 kB
      42.6 kB
      -54 B (-0.1%)
    • GoogleAuthProvider

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      31.9 kB
      31.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      42.7 kB
      42.6 kB
      -54 B (-0.1%)
    • OAuthCredential

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.8 kB
      30.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      41.6 kB
      41.6 kB
      -54 B (-0.1%)
    • OAuthProvider

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      32.2 kB
      32.1 kB
      -53 B (-0.2%)
      size-with-ext-deps
      43.0 kB
      42.9 kB
      -54 B (-0.1%)
    • PhoneAuthCredential

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.9 kB
      30.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      41.7 kB
      41.6 kB
      -54 B (-0.1%)
    • PhoneAuthProvider

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      32.5 kB
      32.4 kB
      -53 B (-0.2%)
      size-with-ext-deps
      43.3 kB
      43.2 kB
      -54 B (-0.1%)
    • PhoneMultiFactorGenerator

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.6 kB
      29.6 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.4 kB
      40.3 kB
      -54 B (-0.1%)
    • RecaptchaVerifier

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      35.1 kB
      35.0 kB
      -53 B (-0.2%)
      size-with-ext-deps
      45.8 kB
      45.8 kB
      -54 B (-0.1%)
    • SAMLAuthProvider

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.8 kB
      30.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      41.6 kB
      41.6 kB
      -54 B (-0.1%)
    • TwitterAuthProvider

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      31.9 kB
      31.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      42.7 kB
      42.6 kB
      -54 B (-0.1%)
    • applyActionCode

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.9 kB
      28.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.7 kB
      39.7 kB
      -54 B (-0.1%)
    • checkActionCode

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.9 kB
      29.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.7 kB
      40.6 kB
      -54 B (-0.1%)
    • confirmPasswordReset

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.0 kB
      28.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.7 kB
      39.7 kB
      -54 B (-0.1%)
    • createUserWithEmailAndPassword

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.8 kB
      29.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.6 kB
      40.6 kB
      -54 B (-0.1%)
    • deleteUser

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.4 kB
      -54 B (-0.1%)
    • fetchSignInMethodsForEmail

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.2 kB
      29.1 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.9 kB
      39.9 kB
      -54 B (-0.1%)
    • getAdditionalUserInfo

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.0 kB
      30.0 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.8 kB
      40.8 kB
      -54 B (-0.1%)
    • getAuth

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      54.6 kB
      54.6 kB
      -53 B (-0.1%)
      size-with-ext-deps
      65.6 kB
      65.6 kB
      -54 B (-0.1%)
    • getIdToken

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.5 kB
      -54 B (-0.1%)
    • getIdTokenResult

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.6 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.4 kB
      -54 B (-0.1%)
    • getMultiFactorResolver

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      31.4 kB
      31.4 kB
      -53 B (-0.2%)
      size-with-ext-deps
      42.2 kB
      42.2 kB
      -54 B (-0.1%)
    • getRedirectResult

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      34.7 kB
      34.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      45.5 kB
      45.5 kB
      -54 B (-0.1%)
    • initializeAuth

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.9 kB
      28.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.7 kB
      39.6 kB
      -54 B (-0.1%)
    • isSignInWithEmailLink

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.9 kB
      29.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.9 kB
      40.9 kB
      -54 B (-0.1%)
    • linkWithCredential

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.7 kB
      29.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.5 kB
      40.5 kB
      -54 B (-0.1%)
    • linkWithPhoneNumber

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      33.4 kB
      33.3 kB
      -53 B (-0.2%)
      size-with-ext-deps
      44.2 kB
      44.1 kB
      -54 B (-0.1%)
    • linkWithPopup

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      35.4 kB
      35.3 kB
      -53 B (-0.1%)
      size-with-ext-deps
      46.2 kB
      46.1 kB
      -54 B (-0.1%)
    • linkWithRedirect

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.9 kB
      29.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.7 kB
      40.7 kB
      -54 B (-0.1%)
    • multiFactor

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.8 kB
      30.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      41.6 kB
      41.5 kB
      -54 B (-0.1%)
    • onAuthStateChanged

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.8 kB
      28.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.5 kB
      -54 B (-0.1%)
    • onIdTokenChanged

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.5 kB
      -54 B (-0.1%)
    • parseActionCodeURL

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.8 kB
      29.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.8 kB
      40.8 kB
      -54 B (-0.1%)
    • reauthenticateWithCredential

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.3 kB
      30.3 kB
      -53 B (-0.2%)
      size-with-ext-deps
      41.1 kB
      41.0 kB
      -54 B (-0.1%)
    • reauthenticateWithPhoneNumber

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      33.9 kB
      33.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      44.7 kB
      44.7 kB
      -54 B (-0.1%)
    • reauthenticateWithPopup

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      35.4 kB
      35.3 kB
      -53 B (-0.1%)
      size-with-ext-deps
      46.2 kB
      46.1 kB
      -54 B (-0.1%)
    • reauthenticateWithRedirect

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.7 kB
      29.6 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.5 kB
      40.4 kB
      -54 B (-0.1%)
    • reload

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.6 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.4 kB
      -54 B (-0.1%)
    • sendEmailVerification

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.7 kB
      29.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.5 kB
      40.5 kB
      -54 B (-0.1%)
    • sendPasswordResetEmail

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.6 kB
      29.6 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.4 kB
      40.4 kB
      -54 B (-0.1%)
    • sendSignInLinkToEmail

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.7 kB
      29.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.5 kB
      40.4 kB
      -54 B (-0.1%)
    • setPersistence

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.5 kB
      -54 B (-0.1%)
    • signInAnonymously

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.0 kB
      29.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.7 kB
      40.7 kB
      -54 B (-0.1%)
    • signInWithCredential

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.1 kB
      30.1 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.9 kB
      40.8 kB
      -54 B (-0.1%)
    • signInWithCustomToken

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.8 kB
      29.8 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.6 kB
      40.6 kB
      -54 B (-0.1%)
    • signInWithEmailAndPassword

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      33.7 kB
      33.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      44.8 kB
      44.7 kB
      -54 B (-0.1%)
    • signInWithEmailLink

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      33.9 kB
      33.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      45.0 kB
      44.9 kB
      -54 B (-0.1%)
    • signInWithPhoneNumber

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      33.7 kB
      33.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      44.5 kB
      44.4 kB
      -54 B (-0.1%)
    • signInWithPopup

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      35.4 kB
      35.3 kB
      -53 B (-0.1%)
      size-with-ext-deps
      46.2 kB
      46.1 kB
      -54 B (-0.1%)
    • signInWithRedirect

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.4 kB
      29.4 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.2 kB
      40.2 kB
      -54 B (-0.1%)
    • signOut

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.4 kB
      -54 B (-0.1%)
    • unlink

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.3 kB
      29.2 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.1 kB
      40.0 kB
      -54 B (-0.1%)
    • updateCurrentUser

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.5 kB
      -54 B (-0.1%)
    • updateEmail

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.0 kB
      29.0 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.8 kB
      39.7 kB
      -54 B (-0.1%)
    • updatePassword

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.0 kB
      29.0 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.8 kB
      39.7 kB
      -54 B (-0.1%)
    • updatePhoneNumber

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.5 kB
      29.4 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.2 kB
      40.2 kB
      -54 B (-0.1%)
    • updateProfile

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.2 kB
      29.1 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.0 kB
      39.9 kB
      -54 B (-0.1%)
    • useAuthEmulator

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      30.4 kB
      30.4 kB
      -53 B (-0.2%)
      size-with-ext-deps
      41.2 kB
      41.2 kB
      -54 B (-0.1%)
    • useDeviceLanguage

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.5 kB
      -54 B (-0.1%)
    • verifyBeforeUpdateEmail

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.8 kB
      29.7 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.6 kB
      40.5 kB
      -54 B (-0.1%)
    • verifyPasswordResetCode

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.9 kB
      29.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.7 kB
      40.7 kB
      -54 B (-0.1%)
    • browserLocalPersistence

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      31.9 kB
      31.9 kB
      -53 B (-0.2%)
      size-with-ext-deps
      42.8 kB
      42.7 kB
      -54 B (-0.1%)
    • browserPopupRedirectResolver

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      44.3 kB
      44.2 kB
      -53 B (-0.1%)
      size-with-ext-deps
      55.2 kB
      55.1 kB
      -54 B (-0.1%)
    • browserSessionPersistence

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      29.3 kB
      29.3 kB
      -53 B (-0.2%)
      size-with-ext-deps
      40.1 kB
      40.1 kB
      -54 B (-0.1%)
    • debugErrorMap

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      39.6 kB
      39.5 kB
      -53 B (-0.1%)
      size-with-ext-deps
      50.3 kB
      50.3 kB
      -54 B (-0.1%)
    • inMemoryPersistence

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.6 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.4 kB
      -54 B (-0.1%)
    • indexedDBLocalPersistence

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      36.2 kB
      36.1 kB
      -53 B (-0.1%)
      size-with-ext-deps
      47.0 kB
      46.9 kB
      -54 B (-0.1%)
    • prodErrorMap

      Size Table

      TypeBase (7b585e8)Head (0164ce7)Diff
      size
      28.7 kB
      28.6 kB
      -53 B (-0.2%)
      size-with-ext-deps
      39.5 kB
      39.4 kB
      -54 B (-0.1%)

@yuchenshi
Copy link
Member

As of the latest persistence compatibility changes, we do store API keys on user.toJSON() so it is indeed possible to compare API keys. Shall we do that?

@yuchenshi yuchenshi assigned sam-gc and unassigned yuchenshi Mar 31, 2021
@sam-gc
Copy link
Contributor Author

sam-gc commented Mar 31, 2021

Done per your suggestion. I've also fixed the _clone() method to (correctly) assign a new Auth instance

@sam-gc sam-gc merged commit 976c5b1 into master Mar 31, 2021
@sam-gc sam-gc deleted the samgho/ui-interop branch March 31, 2021 20:52
@firebase firebase locked and limited conversation to collaborators May 1, 2021
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