Skip to content

A whole bunch of things to bring auth (compat) to parity #3970

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 15 commits into from
Oct 29, 2020

Conversation

sam-gc
Copy link
Contributor

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

No description provided.

@sam-gc sam-gc requested a review from avolkovi October 20, 2020 22:25
@sam-gc sam-gc force-pushed the samgho/auth-wrong branch from df41e56 to a0fc4e7 Compare October 20, 2020 22:28
@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2020

⚠️ No Changeset found

Latest commit: f06b4e0

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

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package "@firebase/remote-config-exp" depends on the ignored package "@firebase/app-exp", but "@firebase/remote-config-exp" is not being ignored. Please add "@firebase/remote-config-exp" to the `ignore` option.
The package "@firebase/remote-config-exp" depends on the ignored package "@firebase/app-types-exp", but "@firebase/remote-config-exp" is not being ignored. Please add "@firebase/remote-config-exp" to the `ignore` option.
The package "@firebase/remote-config-exp" depends on the ignored package "@firebase/installations-exp", but "@firebase/remote-config-exp" is not being ignored. Please add "@firebase/remote-config-exp" to the `ignore` option.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 20, 2020

Binary Size Report

Affected SDKs

  • @firebase/messaging

    Type Base (3f6f5e4) Head (5228948) Diff
    esm2017 26.0 kB 26.2 kB +188 B (+0.7%)
    main 34.7 kB 34.9 kB +206 B (+0.6%)
    module 34.2 kB 34.4 kB +206 B (+0.6%)
  • firebase

    Type Base (3f6f5e4) Head (5228948) Diff
    firebase-messaging.js 40.7 kB 40.8 kB +52 B (+0.1%)
    firebase.js 822 kB 822 kB +52 B (+0.0%)

Test Logs

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 20, 2020

Size Analysis Report

Affected Products

@firebase/auth-exp

  • ActionCodeURL

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.2 kB 39.0 kB +765 B (+2.0%)
    size_with_ext_deps 48.6 kB 49.4 kB +765 B (+1.6%)
  • AuthCredential

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.4 kB 38.2 kB +765 B (+2.0%)
    size_with_ext_deps 47.8 kB 48.6 kB +765 B (+1.6%)
  • EmailAuthCredential

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 39.2 kB 40.0 kB +765 B (+2.0%)
    size_with_ext_deps 49.6 kB 50.4 kB +765 B (+1.5%)
  • EmailAuthProvider

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.6 kB 41.4 kB +765 B (+1.9%)
    size_with_ext_deps 51.0 kB 51.8 kB +765 B (+1.5%)
  • FacebookAuthProvider

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.5 kB 41.3 kB +765 B (+1.9%)
    size_with_ext_deps 51.0 kB 51.7 kB +765 B (+1.5%)
  • GithubAuthProvider

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.5 kB 41.3 kB +765 B (+1.9%)
    size_with_ext_deps 51.0 kB 51.7 kB +765 B (+1.5%)
  • GoogleAuthProvider

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.5 kB 41.3 kB +790 B (+1.9%)
    size_with_ext_deps 51.0 kB 51.8 kB +790 B (+1.6%)
  • OAuthCredential

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 39.2 kB 40.0 kB +765 B (+2.0%)
    size_with_ext_deps 49.7 kB 50.4 kB +765 B (+1.5%)
  • OAuthProvider

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 39.9 kB 40.7 kB +765 B (+1.9%)
    size_with_ext_deps 50.4 kB 51.1 kB +765 B (+1.5%)
  • PhoneAuthCredential

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 39.2 kB 40.0 kB +765 B (+2.0%)
    size_with_ext_deps 49.6 kB 50.4 kB +765 B (+1.5%)
  • PhoneAuthProvider

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 41.0 kB 41.7 kB +765 B (+1.9%)
    size_with_ext_deps 51.4 kB 52.2 kB +765 B (+1.5%)
  • PhoneMultiFactorGenerator

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.1 kB 38.8 kB +765 B (+2.0%)
    size_with_ext_deps 48.5 kB 49.3 kB +765 B (+1.6%)
  • RecaptchaVerifier

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 43.6 kB 44.4 kB +765 B (+1.8%)
    size_with_ext_deps 54.1 kB 54.8 kB +765 B (+1.4%)
  • TwitterAuthProvider

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.5 kB 41.3 kB +765 B (+1.9%)
    size_with_ext_deps 51.0 kB 51.7 kB +765 B (+1.5%)
  • applyActionCode

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.3 kB 38.0 kB +765 B (+2.1%)
    size_with_ext_deps 47.7 kB 48.5 kB +765 B (+1.6%)
  • browserLocalPersistence

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.1 kB 40.9 kB +765 B (+1.9%)
    size_with_ext_deps 50.6 kB 51.4 kB +765 B (+1.5%)
  • browserPopupRedirectResolver

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 49.0 kB 55.0 kB +5.99 kB (+12.2%)
    size_with_ext_deps 59.6 kB 65.6 kB +6.01 kB (+10.1%)

    Dependencies

    Type Base (3f6f5e4) Head (5228948) Diff
    functions
    Click to show 68 deps_castAuth
    _emulatorUrl
    _generateCallbackName
    _generateEventId
    _getBrowserName
    _getClientVersion
    _getCurrentScheme
    _getCurrentUrl
    _getFinalTarget
    _getInstance
    _getProjectConfig
    _getUserLanguage
    _isAndroid
    _isBlackBerry
    _isChromeIOS
    _isFirefox
    _isHttpOrHttps
    _isIEMobile
    _isIOS
    _isIOSStandalone
    _isOnline
    _isSafari
    _isWebOS
    _loadGapi
    _loadJS
    _logError
    _logoutIfInvalidated
    _open
    _openIframe
    _parseToken
    _performApiRequest
    _performFetchWithErrorHandling
    _performSignInRequest
    _persistenceKeyName
    _reloadWithoutSaving
    _setWindowLocation
    _validateOrigin
    _window
    assert
    assertStringOrUndefined
    debugAssert
    debugFail
    deleteAccount
    eventUid
    extractProviderData
    fail
    getAccountInfo
    getHandlerBase
    getIdTokenResult
    getIframeUrl
    getRedirectUrl
    getScriptParentElement
    getVersionForPlatform
    isNullRedirectEvent
    isRedirectEvent
    isUserInvalidated
    loadGapi
    makeTaggedError
    matchDomain
    mergeProviderData
    openAsNewWindowIOS
    registerAuth
    reload
    requestStsToken
    resetUnloadedGapiModules
    secondsStringToMilliseconds
    signInWithIdp
    utcTimestampToDateString
    Click to show 78 deps_castAuth
    _emulatorUrl
    _generateCallbackName
    _generateEventId
    _getBrowserName
    _getClientVersion
    _getCurrentScheme
    _getCurrentUrl
    _getFinalTarget
    _getInstance
    _getProjectConfig
    _getRedirectResult
    _getUserLanguage
    _isAndroid
    _isBlackBerry
    _isChromeIOS
    _isFirefox
    _isHttpOrHttps
    _isIEMobile
    _isIOS
    _isIOSStandalone
    _isOnline
    _isSafari
    _isWebOS
    _link
    _link$1
    _loadGapi
    _loadJS
    _logError
    _logoutIfInvalidated
    _open
    _openIframe
    _parseToken
    _performApiRequest
    _performFetchWithErrorHandling
    _performSignInRequest
    _persistenceKeyName
    _processCredentialSavingMfaContextIfNecessary
    _reauth
    _reauthenticate
    _reloadWithoutSaving
    _setWindowLocation
    _signIn
    _signInWithCredential
    _validateOrigin
    _window
    _withDefaultResolver
    assert
    assertStringOrUndefined
    debugAssert
    debugFail
    deleteAccount
    eventUid
    extractProviderData
    fail
    getAccountInfo
    getHandlerBase
    getIdTokenResult
    getIframeUrl
    getRedirectUrl
    getScriptParentElement
    getVersionForPlatform
    isNullRedirectEvent
    isRedirectEvent
    isUserInvalidated
    loadGapi
    makeTaggedError
    matchDomain
    mergeProviderData
    openAsNewWindowIOS
    providerIdForResponse
    registerAuth
    reload
    requestStsToken
    resetUnloadedGapiModules
    secondsStringToMilliseconds
    signInWithIdp
    utcTimestampToDateString
    Click to show 10 diffs+ _getRedirectResult
    + _link
    + _link$1
    + _processCredentialSavingMfaContextIfNecessary
    + _reauth
    + _reauthenticate
    + _signIn
    + _signInWithCredential
    + _withDefaultResolver
    + providerIdForResponse
    classes
    Click to show 20 depsAuthCredential
    AuthEventManager
    AuthImpl
    AuthInternal
    AuthPopup
    BrowserPersistenceClass
    BrowserPopupRedirectResolver
    BrowserSessionPersistence
    Delay
    FetchProvider
    InMemoryPersistence
    NetworkTimeout
    OAuthCredential
    OAuthProvider
    PersistenceUserManager
    ProactiveRefresh
    StsTokenManager
    Subscription
    UserImpl
    UserMetadata
    Click to show 25 depsAbstractPopupRedirectOperation
    AuthCredential
    AuthEventManager
    AuthImpl
    AuthInternal
    AuthPopup
    BrowserPersistenceClass
    BrowserPopupRedirectResolver
    BrowserSessionPersistence
    Delay
    FetchProvider
    IdpCredential
    InMemoryPersistence
    MultiFactorError
    NetworkTimeout
    OAuthCredential
    OAuthProvider
    PersistenceUserManager
    ProactiveRefresh
    RedirectAction
    StsTokenManager
    Subscription
    UserCredentialImpl
    UserImpl
    UserMetadata
    + AbstractPopupRedirectOperation
    + IdpCredential
    + MultiFactorError
    + RedirectAction
    + UserCredentialImpl
    variables
    Click to show 31 depsAUTH_ERROR_FACTORY
    BASE_POPUP_OPTIONS
    DEFAULT_API_TIMEOUT_MS
    DEFAULT_HEIGHT
    DEFAULT_WIDTH
    EMULATED_IFRAME_PATH
    EMULATOR_WIDGET_PATH
    ERRORS
    EVENT_DUPLICATION_CACHE_DURATION_MS
    FIREFOX_EMPTY_URL
    HTTP_REGEX
    IDP_REQUEST_URI
    IFRAME_ATTRIBUTES
    IFRAME_PATH
    IP_ADDRESS_REGEX
    NETWORK_TIMEOUT
    NETWORK_TIMEOUT_DELAY
    PING_TIMEOUT
    SERVER_ERROR_MAP
    STORAGE_AVAILABLE_KEY
    TARGET_BLANK
    WEB_STORAGE_SUPPORT_KEY
    WIDGET_PATH
    _POLL_WINDOW_CLOSE_TIMEOUT
    browserPopupRedirectResolver
    browserSessionPersistence
    cachedGApiLoader
    inMemoryPersistence
    instanceCache
    logClient
    version
    Click to show 32 depsAUTH_ERROR_FACTORY
    BASE_POPUP_OPTIONS
    DEFAULT_API_TIMEOUT_MS
    DEFAULT_HEIGHT
    DEFAULT_WIDTH
    EMULATED_IFRAME_PATH
    EMULATOR_WIDGET_PATH
    ERRORS
    EVENT_DUPLICATION_CACHE_DURATION_MS
    FIREFOX_EMPTY_URL
    HTTP_REGEX
    IDP_REQUEST_URI
    IFRAME_ATTRIBUTES
    IFRAME_PATH
    IP_ADDRESS_REGEX
    NETWORK_TIMEOUT
    NETWORK_TIMEOUT_DELAY
    PING_TIMEOUT
    SERVER_ERROR_MAP
    STORAGE_AVAILABLE_KEY
    TARGET_BLANK
    WEB_STORAGE_SUPPORT_KEY
    WIDGET_PATH
    _POLL_WINDOW_CLOSE_TIMEOUT
    browserPopupRedirectResolver
    browserSessionPersistence
    cachedGApiLoader
    inMemoryPersistence
    instanceCache
    logClient
    redirectOutcomeMap
    version
    + redirectOutcomeMap
  • browserSessionPersistence

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.8 kB 38.6 kB +765 B (+2.0%)
    size_with_ext_deps 48.2 kB 49.0 kB +765 B (+1.6%)
  • checkActionCode

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.3 kB 39.0 kB +765 B (+2.0%)
    size_with_ext_deps 48.7 kB 49.5 kB +765 B (+1.6%)
  • confirmPasswordReset

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.3 kB 38.1 kB +765 B (+2.1%)
    size_with_ext_deps 47.7 kB 48.5 kB +765 B (+1.6%)
  • createUserWithEmailAndPassword

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.2 kB 39.0 kB +765 B (+2.0%)
    size_with_ext_deps 48.6 kB 49.4 kB +765 B (+1.6%)
  • deleteUser

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.2 kB 37.9 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.4 kB +765 B (+1.6%)
  • fetchSignInMethodsForEmail

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.5 kB 38.3 kB +765 B (+2.0%)
    size_with_ext_deps 47.9 kB 48.7 kB +765 B (+1.6%)
  • getAdditionalUserInfo

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.5 kB 39.3 kB +765 B (+2.0%)
    size_with_ext_deps 48.9 kB 49.7 kB +765 B (+1.6%)
  • getAuth

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 59.0 kB 65.0 kB +5.99 kB (+10.2%)
    size_with_ext_deps 70.3 kB 76.3 kB +6.01 kB (+8.5%)

    Dependencies

    Type Base (3f6f5e4) Head (5228948) Diff
    functions
    Click to show 87 deps_allSettled
    _castAuth
    _deleteDatabase
    _emulatorUrl
    _generateCallbackName
    _generateEventId
    _getActiveServiceWorker
    _getBrowserName
    _getClientVersion
    _getCurrentScheme
    _getCurrentUrl
    _getFinalTarget
    _getInstance
    _getProjectConfig
    _getServiceWorkerController
    _getUserLanguage
    _getWorkerGlobalScope
    _iframeCannotSyncWebStorage
    _initializeAuthInstance
    _isAndroid
    _isBlackBerry
    _isChromeIOS
    _isFirefox
    _isHttpOrHttps
    _isIE10
    _isIEMobile
    _isIOS
    _isIOSStandalone
    _isIframe
    _isMobileBrowser
    _isOnline
    _isSafari
    _isWebOS
    _isWorker
    _loadGapi
    _loadJS
    _logError
    _logoutIfInvalidated
    _open
    _openDatabase
    _openIframe
    _parseToken
    _performApiRequest
    _performFetchWithErrorHandling
    _performSignInRequest
    _persistenceKeyName
    _putObject
    _reloadWithoutSaving
    _setWindowLocation
    _validateOrigin
    _window
    assert
    assertStringOrUndefined
    debugAssert
    debugFail
    deleteAccount
    deleteObject
    eventUid
    extractProviderData
    fail
    generateEventId
    getAccountInfo
    getAuth
    getHandlerBase
    getIdTokenResult
    getIframeUrl
    getObject
    getObjectStore
    getRedirectUrl
    getScriptParentElement
    getVersionForPlatform
    initializeAuth
    isNullRedirectEvent
    isRedirectEvent
    isUserInvalidated
    loadGapi
    makeTaggedError
    matchDomain
    mergeProviderData
    openAsNewWindowIOS
    registerAuth
    reload
    requestStsToken
    resetUnloadedGapiModules
    secondsStringToMilliseconds
    signInWithIdp
    utcTimestampToDateString
    Click to show 97 deps_allSettled
    _castAuth
    _deleteDatabase
    _emulatorUrl
    _generateCallbackName
    _generateEventId
    _getActiveServiceWorker
    _getBrowserName
    _getClientVersion
    _getCurrentScheme
    _getCurrentUrl
    _getFinalTarget
    _getInstance
    _getProjectConfig
    _getRedirectResult
    _getServiceWorkerController
    _getUserLanguage
    _getWorkerGlobalScope
    _iframeCannotSyncWebStorage
    _initializeAuthInstance
    _isAndroid
    _isBlackBerry
    _isChromeIOS
    _isFirefox
    _isHttpOrHttps
    _isIE10
    _isIEMobile
    _isIOS
    _isIOSStandalone
    _isIframe
    _isMobileBrowser
    _isOnline
    _isSafari
    _isWebOS
    _isWorker
    _link
    _link$1
    _loadGapi
    _loadJS
    _logError
    _logoutIfInvalidated
    _open
    _openDatabase
    _openIframe
    _parseToken
    _performApiRequest
    _performFetchWithErrorHandling
    _performSignInRequest
    _persistenceKeyName
    _processCredentialSavingMfaContextIfNecessary
    _putObject
    _reauth
    _reauthenticate
    _reloadWithoutSaving
    _setWindowLocation
    _signIn
    _signInWithCredential
    _validateOrigin
    _window
    _withDefaultResolver
    assert
    assertStringOrUndefined
    debugAssert
    debugFail
    deleteAccount
    deleteObject
    eventUid
    extractProviderData
    fail
    generateEventId
    getAccountInfo
    getAuth
    getHandlerBase
    getIdTokenResult
    getIframeUrl
    getObject
    getObjectStore
    getRedirectUrl
    getScriptParentElement
    getVersionForPlatform
    initializeAuth
    isNullRedirectEvent
    isRedirectEvent
    isUserInvalidated
    loadGapi
    makeTaggedError
    matchDomain
    mergeProviderData
    openAsNewWindowIOS
    providerIdForResponse
    registerAuth
    reload
    requestStsToken
    resetUnloadedGapiModules
    secondsStringToMilliseconds
    signInWithIdp
    utcTimestampToDateString
    Click to show 10 diffs+ _getRedirectResult
    + _link
    + _link$1
    + _processCredentialSavingMfaContextIfNecessary
    + _reauth
    + _reauthenticate
    + _signIn
    + _signInWithCredential
    + _withDefaultResolver
    + providerIdForResponse
    classes
    Click to show 25 depsAuthCredential
    AuthEventManager
    AuthImpl
    AuthInternal
    AuthPopup
    BrowserLocalPersistence
    BrowserPersistenceClass
    BrowserPopupRedirectResolver
    BrowserSessionPersistence
    DBPromise
    Delay
    FetchProvider
    InMemoryPersistence
    IndexedDBLocalPersistence
    NetworkTimeout
    OAuthCredential
    OAuthProvider
    PersistenceUserManager
    ProactiveRefresh
    Receiver
    Sender
    StsTokenManager
    Subscription
    UserImpl
    UserMetadata
    Click to show 30 depsAbstractPopupRedirectOperation
    AuthCredential
    AuthEventManager
    AuthImpl
    AuthInternal
    AuthPopup
    BrowserLocalPersistence
    BrowserPersistenceClass
    BrowserPopupRedirectResolver
    BrowserSessionPersistence
    DBPromise
    Delay
    FetchProvider
    IdpCredential
    InMemoryPersistence
    IndexedDBLocalPersistence
    MultiFactorError
    NetworkTimeout
    OAuthCredential
    OAuthProvider
    PersistenceUserManager
    ProactiveRefresh
    Receiver
    RedirectAction
    Sender
    StsTokenManager
    Subscription
    UserCredentialImpl
    UserImpl
    UserMetadata
    + AbstractPopupRedirectOperation
    + IdpCredential
    + MultiFactorError
    + RedirectAction
    + UserCredentialImpl
    variables
    Click to show 40 depsAUTH_ERROR_FACTORY
    BASE_POPUP_OPTIONS
    DB_DATA_KEYPATH
    DB_NAME
    DB_OBJECTSTORE_NAME
    DB_VERSION
    DEFAULT_API_TIMEOUT_MS
    DEFAULT_HEIGHT
    DEFAULT_WIDTH
    EMULATED_IFRAME_PATH
    EMULATOR_WIDGET_PATH
    ERRORS
    EVENT_DUPLICATION_CACHE_DURATION_MS
    FIREFOX_EMPTY_URL
    HTTP_REGEX
    IDP_REQUEST_URI
    IE10_LOCAL_STORAGE_SYNC_DELAY
    IFRAME_ATTRIBUTES
    IFRAME_PATH
    IP_ADDRESS_REGEX
    NETWORK_TIMEOUT
    NETWORK_TIMEOUT_DELAY
    PING_TIMEOUT
    SERVER_ERROR_MAP
    STORAGE_AVAILABLE_KEY
    TARGET_BLANK
    WEB_STORAGE_SUPPORT_KEY
    WIDGET_PATH
    _POLLING_INTERVAL_MS
    _POLLING_INTERVAL_MS$1
    _POLL_WINDOW_CLOSE_TIMEOUT
    browserLocalPersistence
    browserPopupRedirectResolver
    browserSessionPersistence
    cachedGApiLoader
    inMemoryPersistence
    indexedDBLocalPersistence
    instanceCache
    logClient
    version
    Click to show 41 depsAUTH_ERROR_FACTORY
    BASE_POPUP_OPTIONS
    DB_DATA_KEYPATH
    DB_NAME
    DB_OBJECTSTORE_NAME
    DB_VERSION
    DEFAULT_API_TIMEOUT_MS
    DEFAULT_HEIGHT
    DEFAULT_WIDTH
    EMULATED_IFRAME_PATH
    EMULATOR_WIDGET_PATH
    ERRORS
    EVENT_DUPLICATION_CACHE_DURATION_MS
    FIREFOX_EMPTY_URL
    HTTP_REGEX
    IDP_REQUEST_URI
    IE10_LOCAL_STORAGE_SYNC_DELAY
    IFRAME_ATTRIBUTES
    IFRAME_PATH
    IP_ADDRESS_REGEX
    NETWORK_TIMEOUT
    NETWORK_TIMEOUT_DELAY
    PING_TIMEOUT
    SERVER_ERROR_MAP
    STORAGE_AVAILABLE_KEY
    TARGET_BLANK
    WEB_STORAGE_SUPPORT_KEY
    WIDGET_PATH
    _POLLING_INTERVAL_MS
    _POLLING_INTERVAL_MS$1
    _POLL_WINDOW_CLOSE_TIMEOUT
    browserLocalPersistence
    browserPopupRedirectResolver
    browserSessionPersistence
    cachedGApiLoader
    inMemoryPersistence
    indexedDBLocalPersistence
    instanceCache
    logClient
    redirectOutcomeMap
    version
    + redirectOutcomeMap
  • getIdToken

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.2 kB 38.0 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.4 kB +765 B (+1.6%)
  • getIdTokenResult

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.1 kB 37.9 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.3 kB +765 B (+1.6%)
  • getMultiFactorResolver

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.0 kB 40.8 kB +765 B (+1.9%)
    size_with_ext_deps 50.5 kB 51.2 kB +765 B (+1.5%)
  • getRedirectResult

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 42.7 kB 43.7 kB +1.00 kB (+2.3%)
    size_with_ext_deps 53.1 kB 54.1 kB +1.00 kB (+1.9%)

    Dependencies

    Type Base (3f6f5e4) Head (5228948) Diff
    functions
    Click to show 54 deps_castAuth
    _emulatorUrl
    _getBrowserName
    _getClientVersion
    _getCurrentScheme
    _getFinalTarget
    _getInstance
    _getUserLanguage
    _isAndroid
    _isBlackBerry
    _isChromeIOS
    _isFirefox
    _isHttpOrHttps
    _isIEMobile
    _isOnline
    _isSafari
    _isWebOS
    _link
    _link$1
    _logError
    _logoutIfInvalidated
    _parseToken
    _performApiRequest
    _performFetchWithErrorHandling
    _performSignInRequest
    _persistenceKeyName
    _processCredentialSavingMfaContextIfNecessary
    _reauth
    _reauthenticate
    _reloadWithoutSaving
    _signIn
    _signInWithCredential
    _withDefaultResolver
    assert
    assertStringOrUndefined
    debugAssert
    debugFail
    deleteAccount
    extractProviderData
    fail
    getAccountInfo
    getIdTokenResult
    getRedirectResult
    getVersionForPlatform
    isUserInvalidated
    makeTaggedError
    mergeProviderData
    providerIdForResponse
    registerAuth
    reload
    requestStsToken
    secondsStringToMilliseconds
    signInWithIdp
    utcTimestampToDateString
    Click to show 55 deps_castAuth
    _emulatorUrl
    _getBrowserName
    _getClientVersion
    _getCurrentScheme
    _getFinalTarget
    _getInstance
    _getRedirectResult
    _getUserLanguage
    _isAndroid
    _isBlackBerry
    _isChromeIOS
    _isFirefox
    _isHttpOrHttps
    _isIEMobile
    _isOnline
    _isSafari
    _isWebOS
    _link
    _link$1
    _logError
    _logoutIfInvalidated
    _parseToken
    _performApiRequest
    _performFetchWithErrorHandling
    _performSignInRequest
    _persistenceKeyName
    _processCredentialSavingMfaContextIfNecessary
    _reauth
    _reauthenticate
    _reloadWithoutSaving
    _signIn
    _signInWithCredential
    _withDefaultResolver
    assert
    assertStringOrUndefined
    debugAssert
    debugFail
    deleteAccount
    extractProviderData
    fail
    getAccountInfo
    getIdTokenResult
    getRedirectResult
    getVersionForPlatform
    isUserInvalidated
    makeTaggedError
    mergeProviderData
    providerIdForResponse
    registerAuth
    reload
    requestStsToken
    secondsStringToMilliseconds
    signInWithIdp
    utcTimestampToDateString
    + _getRedirectResult
  • inMemoryPersistence

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.2 kB 37.9 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.3 kB +765 B (+1.6%)
  • indexedDBLocalPersistence

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 44.4 kB 45.1 kB +765 B (+1.7%)
    size_with_ext_deps 54.8 kB 55.6 kB +765 B (+1.4%)
  • initializeAuth

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.5 kB 38.2 kB +765 B (+2.0%)
    size_with_ext_deps 48.5 kB 49.3 kB +765 B (+1.6%)
  • isSignInWithEmailLink

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.3 kB 39.1 kB +765 B (+2.0%)
    size_with_ext_deps 48.7 kB 49.5 kB +765 B (+1.6%)
  • linkWithCredential

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.2 kB 39.0 kB +775 B (+2.0%)
    size_with_ext_deps 48.6 kB 49.4 kB +775 B (+1.6%)
  • linkWithPhoneNumber

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 41.8 kB 42.6 kB +775 B (+1.9%)
    size_with_ext_deps 52.2 kB 53.0 kB +775 B (+1.5%)
  • linkWithPopup

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 45.7 kB 46.6 kB +922 B (+2.0%)
    size_with_ext_deps 56.2 kB 57.1 kB +922 B (+1.6%)
  • linkWithRedirect

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.7 kB 41.5 kB +765 B (+1.9%)
    size_with_ext_deps 51.2 kB 51.9 kB +765 B (+1.5%)
  • multiFactor

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 39.3 kB 40.0 kB +765 B (+1.9%)
    size_with_ext_deps 49.7 kB 50.5 kB +765 B (+1.5%)
  • onAuthStateChanged

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.2 kB 38.0 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.4 kB +765 B (+1.6%)
  • onIdTokenChanged

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.2 kB 38.0 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.4 kB +765 B (+1.6%)
  • parseActionCodeURL

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.2 kB 39.0 kB +765 B (+2.0%)
    size_with_ext_deps 48.7 kB 49.4 kB +765 B (+1.6%)
  • reauthenticateWithCredential

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.8 kB 39.6 kB +775 B (+2.0%)
    size_with_ext_deps 49.3 kB 50.0 kB +775 B (+1.6%)
  • reauthenticateWithPhoneNumber

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 42.4 kB 43.2 kB +775 B (+1.8%)
    size_with_ext_deps 52.9 kB 53.6 kB +775 B (+1.5%)
  • reauthenticateWithPopup

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 45.7 kB 46.6 kB +922 B (+2.0%)
    size_with_ext_deps 56.2 kB 57.1 kB +922 B (+1.6%)
  • reauthenticateWithRedirect

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.5 kB 41.2 kB +765 B (+1.9%)
    size_with_ext_deps 50.9 kB 51.7 kB +765 B (+1.5%)
  • reload

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.1 kB 37.9 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.3 kB +765 B (+1.6%)
  • sendEmailVerification

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.1 kB 38.9 kB +765 B (+2.0%)
    size_with_ext_deps 48.5 kB 49.3 kB +765 B (+1.6%)
  • sendPasswordResetEmail

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.0 kB 38.8 kB +765 B (+2.0%)
    size_with_ext_deps 48.4 kB 49.2 kB +765 B (+1.6%)
  • sendSignInLinkToEmail

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.1 kB 38.8 kB +765 B (+2.0%)
    size_with_ext_deps 48.5 kB 49.3 kB +765 B (+1.6%)
  • setPersistence

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.2 kB 38.0 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.4 kB +765 B (+1.6%)
  • signInAnonymously

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.3 kB 39.1 kB +765 B (+2.0%)
    size_with_ext_deps 48.7 kB 49.5 kB +765 B (+1.6%)
  • signInWithCredential

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.6 kB 39.4 kB +780 B (+2.0%)
    size_with_ext_deps 49.0 kB 49.8 kB +780 B (+1.6%)
  • signInWithCustomToken

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.2 kB 39.0 kB +788 B (+2.1%)
    size_with_ext_deps 48.6 kB 49.4 kB +788 B (+1.6%)
  • signInWithEmailAndPassword

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 42.1 kB 42.9 kB +780 B (+1.9%)
    size_with_ext_deps 52.5 kB 53.3 kB +780 B (+1.5%)
  • signInWithEmailLink

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 42.3 kB 43.1 kB +780 B (+1.8%)
    size_with_ext_deps 52.7 kB 53.5 kB +780 B (+1.5%)
  • signInWithPhoneNumber

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 42.1 kB 42.9 kB +780 B (+1.9%)
    size_with_ext_deps 52.6 kB 53.4 kB +780 B (+1.5%)
  • signInWithPopup

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 45.7 kB 46.6 kB +922 B (+2.0%)
    size_with_ext_deps 56.2 kB 57.1 kB +922 B (+1.6%)
  • signInWithRedirect

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 40.2 kB 41.0 kB +765 B (+1.9%)
    size_with_ext_deps 50.6 kB 51.4 kB +765 B (+1.5%)
  • signOut

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.2 kB 37.9 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.4 kB +765 B (+1.6%)
  • unlink

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.8 kB 38.5 kB +765 B (+2.0%)
    size_with_ext_deps 48.2 kB 49.0 kB +765 B (+1.6%)
  • updateCurrentUser

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.2 kB 38.0 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.4 kB +765 B (+1.6%)
  • updateEmail

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.4 kB 38.2 kB +788 B (+2.1%)
    size_with_ext_deps 47.9 kB 48.7 kB +788 B (+1.6%)
  • updatePassword

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.4 kB 38.2 kB +788 B (+2.1%)
    size_with_ext_deps 47.9 kB 48.7 kB +788 B (+1.6%)
  • updatePhoneNumber

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.9 kB 38.7 kB +775 B (+2.0%)
    size_with_ext_deps 48.3 kB 49.1 kB +775 B (+1.6%)
  • updateProfile

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.6 kB 38.4 kB +788 B (+2.1%)
    size_with_ext_deps 48.1 kB 48.9 kB +788 B (+1.6%)
  • useDeviceLanguage

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 37.2 kB 38.0 kB +765 B (+2.1%)
    size_with_ext_deps 47.6 kB 48.4 kB +765 B (+1.6%)
  • verifyBeforeUpdateEmail

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.1 kB 38.9 kB +765 B (+2.0%)
    size_with_ext_deps 48.6 kB 49.3 kB +765 B (+1.6%)
  • verifyPasswordResetCode

    Size

    Type Base (3f6f5e4) Head (5228948) Diff
    size 38.4 kB 39.1 kB +765 B (+2.0%)
    size_with_ext_deps 48.8 kB 49.6 kB +765 B (+1.6%)

Test Logs

@sam-gc sam-gc force-pushed the samgho/auth-wrong branch from 95dc180 to 34a2a39 Compare October 27, 2020 20:26
@sam-gc sam-gc marked this pull request as ready for review October 27, 2020 20:32
});

return this._initializationPromise;
// After initialization completes, throw any error caused by redirect flow
return this._initializationPromise.then(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

why then instead of await?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we await it, the error becomes part of the control flow of initialization. If there's an error with redirect during initialization, we still want auth to finish initializing

Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we just wrap in a try catch then?

// First check to see if we have a pending redirect event.
let storedUser = (await this.assertedPersistence.getCurrentUser()) as User | null;
if (popupRedirectResolver) {
await this.getOrInitRedirectPersistenceManager();
Copy link
Contributor

Choose a reason for hiding this comment

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

should we have this method return the redirectUser?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no; the purpose of this method is to determine which user should be set as currentUser. The method first determines that, then updates it.

@sam-gc sam-gc force-pushed the samgho/auth-wrong branch from 56e0e67 to f93bffd Compare October 29, 2020 19:17
@sam-gc sam-gc merged commit 2ac31a1 into master Oct 29, 2020
@sam-gc sam-gc deleted the samgho/auth-wrong branch October 29, 2020 22:39
wu-hui added a commit that referenced this pull request Nov 9, 2020
* Rolls a node app building bundles.

* Build bundle files for given list of project IDs.

* Build the bundle json map and save it for integration tests.

* Add emulator_settings.ts to gulp

* Move bundle.test.ts to api/

* Bundles passes all tests and expose in classic API

* Add CI project ID to bundles.

* Adhoc string replacement and length re-calculation

* Fix lint errors.

* Delete old changes from make node app

* Address comments

* Update yarn.lock for release (#3998)

Temp fix where database version is bumped before firebase-admin can update deps

* Manually prepares the bundle strings.

* Update API

* Update config.ts

* Use Chrome for karma debugging (#4007)

* Cache emulator between runs (#3956)

* Remote Config Modularization (#3975)

* rc exp init

* Add apis

* register rc exp

* implement funcitonal APIs

* fix tests

* build rc exp

* add api-extractor to rc types

* cast directly witout function

* delete changelog for rc exp

* add code owners to rc exp

* update dep version

* Remove AuthErrorCode from core export (#4013)

* Remove AuthErrorCode from core export

* Api

* Update config.ts to remove bundles

* adds a root changelog (#4009)

* adds a root changelog

* Update CHANGELOG.md

Co-authored-by: Feiyang <[email protected]>

* Update dependency typescript to v4.0.5 (#3846)

Co-authored-by: Renovate Bot <[email protected]>

* Update dependency karma-firefox-launcher to v2 (#3987)

Co-authored-by: Renovate Bot <[email protected]>

* Update dependency google-closure-library to v20200830 (#3765)

* Update dependency google-closure-library to v20200830

* Replace goog.isArray with Array.isArray

https://github.com/google/closure-library/releases/tag/v20200628

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Alex Volkovitsky <[email protected]>

* exclude remote config exp packages in changeset (#4014)

* Set 1s timeout for onBackgroundMessage Hook (#3780)

* await onBackgroundMessage hook

* Create fluffy-panthers-hide.md

* block in onPush to let onBackgroundMessage to execute

* polish wording

* Update changeset

to be more specific

* Update fluffy-panthers-hide.md

* Clarify PR is about a bug fix

* Update fluffy-panthers-hide.md

* A whole bunch of things to bring auth (compat) to parity (#3970)

* Handle anonymous auth re-login edge case

* Formatting

* Initial fixes

* Fix redirect

* clean up additional user info

* Formatting

* PR feedback

* Fix some tests

* Fix tests & write some new ones

* Fix broken build

* Formatting

* Formatting

* PR feedback

* Formatting

* PR feedback

Co-authored-by: avolkovi <[email protected]>

* Add withFunctionsTriggersDisabled method to rules-unit-testing (#3928)

* Update integration tests to use free functions

* Functions compat package (#3739)

* Add free functions to exports

* Fix to avoid false failures on changeset checker (#4012)

* Add changeset for Firestore (#4030)

* Update functions-compat dep version and fix changeset script error (#4032)

* Update integration tests. Minified tests fail.

* Bump node memory limit for all test CI (#4035)

* Compat Layer for Firestore (#4003)

* Rename all public API types to PublicX (#4039)

* Update all non-major dependencies (#3953)

Co-authored-by: Renovate Bot <[email protected]>

* Version Packages (#4033)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Set up Storage modularization (#3499)

Refactor storage for modularization.

* Free functions removed from exp database.ts

Co-authored-by: Christina Holland <[email protected]>
Co-authored-by: Sebastian Schmidt <[email protected]>
Co-authored-by: Sam Stern <[email protected]>
Co-authored-by: Feiyang <[email protected]>
Co-authored-by: Sam Horlbeck Olsen <[email protected]>
Co-authored-by: Dimitri Mitropoulos <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Alex Volkovitsky <[email protected]>
Co-authored-by: Kai Wu <[email protected]>
Co-authored-by: Google Open Source Bot <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@firebase firebase locked and limited conversation to collaborators Nov 29, 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.

3 participants