Skip to content

Allow FirstPartyAuth to specify a token factory func. #6495

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 5 commits into from
Aug 5, 2022

Conversation

wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Aug 2, 2022

Based upon (#4773)

* Allow firstparty credentials to specify an authToken factory that is used in lieu of direct GAPI.

* Remove stray import

* Add return type to private method

Co-authored-by: wu-hui <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Aug 2, 2022

⚠️ No Changeset found

Latest commit: ab5a0fa

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 2, 2022

Size Report 1

Affected Products

  • @firebase/app

    TypeBase (6a17eb6)Merge (881b9c8)Diff
    browser13.9 kB14.1 kB+204 B (+1.5%)
    esm518.1 kB18.4 kB+246 B (+1.4%)
    main19.1 kB19.3 kB+242 B (+1.3%)
    module13.9 kB14.1 kB+204 B (+1.5%)
  • @firebase/firestore

    TypeBase (6a17eb6)Merge (881b9c8)Diff
    browser264 kB264 kB+169 B (+0.1%)
    esm5327 kB327 kB+294 B (+0.1%)
    main525 kB525 kB+472 B (+0.1%)
    module264 kB264 kB+169 B (+0.1%)
    react-native264 kB264 kB+169 B (+0.1%)
  • @firebase/firestore-lite

    TypeBase (6a17eb6)Merge (881b9c8)Diff
    browser80.5 kB80.7 kB+172 B (+0.2%)
    esm596.2 kB96.5 kB+297 B (+0.3%)
    main135 kB136 kB+446 B (+0.3%)
    module80.5 kB80.7 kB+172 B (+0.2%)
    react-native80.7 kB80.9 kB+172 B (+0.2%)
  • bundle

    43 size changes

    TypeBase (6a17eb6)Merge (881b9c8)Diff
    analytics (logEvent)41.8 kB41.9 kB+110 B (+0.3%)
    app-check (CustomProvider)35.4 kB35.5 kB+110 B (+0.3%)
    app-check (ReCaptchaEnterpriseProvider)37.6 kB37.7 kB+110 B (+0.3%)
    app-check (ReCaptchaV3Provider)37.6 kB37.7 kB+110 B (+0.3%)
    auth (Anonymous)66.3 kB66.4 kB+110 B (+0.2%)
    auth (EmailAndPassword)70.4 kB70.5 kB+110 B (+0.2%)
    auth (GoogleFBTwitterGitHubPopup)90.3 kB90.4 kB+110 B (+0.1%)
    auth (GooglePopup)90.0 kB90.1 kB+110 B (+0.1%)
    auth (GoogleRedirect)90.2 kB90.3 kB+110 B (+0.1%)
    auth (Phone)76.5 kB76.6 kB+110 B (+0.1%)
    database (Append to a list of data)145 kB145 kB+110 B (+0.1%)
    database (Filtering data)144 kB144 kB+110 B (+0.1%)
    database (Listen for child events)160 kB160 kB+110 B (+0.1%)
    database (Listen for value events + Detach listeners)160 kB160 kB+110 B (+0.1%)
    database (Listen for value events)160 kB160 kB+110 B (+0.1%)
    database (Read data once)156 kB157 kB+110 B (+0.1%)
    database (Save data as transactions)162 kB162 kB+110 B (+0.1%)
    database (Sort data)145 kB145 kB+110 B (+0.1%)
    database (Write data)144 kB144 kB+110 B (+0.1%)
    firestore (Persistence)274 kB274 kB+280 B (+0.1%)
    firestore (Query Cursors)211 kB211 kB+273 B (+0.1%)
    firestore (Query)212 kB212 kB+273 B (+0.1%)
    firestore (Read data once)200 kB200 kB+273 B (+0.1%)
    firestore (Realtime updates)202 kB203 kB+273 B (+0.1%)
    firestore (Transaction)184 kB184 kB+273 B (+0.1%)
    firestore (Write data)184 kB184 kB+273 B (+0.1%)
    firestore-lite (Query Cursors)67.9 kB68.2 kB+282 B (+0.4%)
    firestore-lite (Query)71.1 kB71.4 kB+282 B (+0.4%)
    firestore-lite (Read data once)55.5 kB55.8 kB+279 B (+0.5%)
    firestore-lite (Transaction)80.1 kB80.3 kB+282 B (+0.4%)
    firestore-lite (Write data)65.3 kB65.5 kB+282 B (+0.4%)
    functions (call)29.2 kB29.3 kB+110 B (+0.4%)
    messaging (send + receive)45.1 kB45.3 kB+110 B (+0.2%)
    performance (trace)49.6 kB49.7 kB+110 B (+0.2%)
    remote-config (getAndFetch)44.2 kB44.3 kB+110 B (+0.2%)
    storage (getBytes)37.5 kB37.6 kB+110 B (+0.3%)
    storage (getDownloadURL)39.6 kB39.7 kB+110 B (+0.3%)
    storage (getMetadata)39.0 kB39.1 kB+110 B (+0.3%)
    storage (list + listAll)38.4 kB38.6 kB+110 B (+0.3%)
    storage (updateMetadata)39.3 kB39.4 kB+110 B (+0.3%)
    storage (uploadBytes)43.8 kB43.9 kB+110 B (+0.3%)
    storage (uploadBytesResumable)53.3 kB53.4 kB+110 B (+0.2%)
    storage (uploadString)44.0 kB44.2 kB+110 B (+0.2%)

  • firebase

    TypeBase (6a17eb6)Merge (881b9c8)Diff
    firebase-app-compat.js27.7 kB27.8 kB+90 B (+0.3%)
    firebase-app.js87.4 kB87.7 kB+334 B (+0.4%)
    firebase-compat.js794 kB795 kB+266 B (+0.0%)
    firebase-firestore-compat.js314 kB314 kB+170 B (+0.1%)
    firebase-firestore-lite.js267 kB267 kB+399 B (+0.1%)
    firebase-firestore.js851 kB852 kB+396 B (+0.0%)
    firebase-performance-standalone-compat.es2017.js87.5 kB87.6 kB+104 B (+0.1%)
    firebase-performance-standalone-compat.js65.3 kB65.4 kB+104 B (+0.2%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/xXpjYjs4CA.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 2, 2022

Size Analysis Report 1

This report is too large (149,797 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/QtsOFL2zMs.html

private _headers = new Map();

constructor(
private readonly gapi: Gapi,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this potentially be nullable? I think part of the intent here is to reduce the dep on gapi.js for first party usage.

(I recognize that making this type nullable may cause a slight ripple effect in this file).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made it nullable, but I don't think it is of much difference..unless I misunderstood you.

Copy link
Contributor

@MarkDuckworth MarkDuckworth left a comment

Choose a reason for hiding this comment

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

Looks good.

@wu-hui wu-hui merged commit 79df09b into master Aug 5, 2022
@wu-hui wu-hui deleted the wuandy/FirstPartyAuth branch August 5, 2022 17:25
@firebase firebase locked and limited conversation to collaborators Sep 5, 2022
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.

5 participants