Skip to content
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

Adding global caches to survive/warn on HMR, cleanup, etc. #2661

Merged
merged 4 commits into from
Nov 17, 2020

Conversation

jamesdaniels
Copy link
Member

@jamesdaniels jamesdaniels commented Nov 17, 2020

  • Adding global instance caches to the modules, so they don't freak out when HMR is enabled (HMR t v6.1.0 RC3: Firestore Emulators Error: Precondition failed #2655). This takes on globalThis as a needed polyfill for many environments.
  • If injected settings for modules are changed after they are initialized you will receive a warning and the prior instance will be returned (ignoring the changes), this is especially important for HMR. If HMR is detected there will be an additional warning suggesting they do a full reload to see the changes.
  • Added a polyfill table and notes about why we version like we do
  • Adding more convoluted stuff to my sample app to flex AngularFire
  • Internal cleanup on AngularFireAnalytics
  • AngularFireAnalytics will now wait for UserTrackingService to detect the user before sending the screen_view event, if UserTrackingService has been provided
  • Adding a warning if the Auth Emulator is detected in conjunction with AngularFirestore and AngularFireDatabase as they will invalidate the emulated auth token before the dynamic import of firebase/auth is completed (Firestore emulator calls Google APIs to check auth token #2656)
  • Warn if we absorbed an error keeping Firestore persistence from enabling
  • Logging sign_up and login events in UserTrackingService
  • Adding credential observer to AngularFireAuth

@google-cla google-cla bot added the cla: yes label Nov 17, 2020
@jamesdaniels jamesdaniels merged commit b666a80 into master Nov 17, 2020
@jamesdaniels jamesdaniels deleted the 610-hmr-etc branch November 17, 2020 23:04
@volago
Copy link

volago commented Dec 4, 2020

Hi.

I've notice that credentials are available just after user logging. When I refresh the page, user is still logged, but credentials are null. Is it desired behavior?

Where can I get accessToken (for download Facebook avatar) when user is already logged in?

@jamesdaniels
Copy link
Member Author

@volago Yes, this is expected behavior with Firebase. If you need persistence for the access token you'll need to do that yourself, toss it in Firestore/Database perhaps? Make sure to lock it down with security rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants