polymerfire
polymerfire copied to clipboard
firebase-auth interrupts
signInWithPopup()
- the popup disappears immediately.
On signInWithRedirect()
- it starts neverending chain of redirects forth and back without authentication.
I use Polymer 2.0 and polymerfire#2.0-preview
I've something similar at login as well. Sometimes works and others I'm getting:
code: "auth/network-request-failed"message: "A network error (such as timeout, interrupted connection or unreachable host) has occurred."__proto__: Error
(anonymous) @ firebase-auth.js:39
I found the issue:
In the sw-precache-config.js
I've changed this
navigateFallbackWhitelist: [/^(?!.*\.html$|\/data\/).*/],
For this.
navigateFallbackWhitelist: [/^(?!\/__)/],
In some cases you may need to whitelist 3rd party services with sw-precache, so the Service Worker doesn't intercept them. For instance, if you're hosting your app on Firebase, you'll want to add the navigateFallbackWhitelist: [/^(?!/__)/] option to your swPrecacheConfig as Firebase owns the __ namespace, and intercepting it will cause things like OAuth to fail.
Reference: https://github.com/Polymer/polymer-build/blob/master/README.md