polymerfire icon indicating copy to clipboard operation
polymerfire copied to clipboard

firebase-auth interrupts

Open AlexNasonov opened this issue 7 years ago • 1 comments

doesn't finish authentication pocess. If I use 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

AlexNasonov avatar Apr 23 '17 17:04 AlexNasonov

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

Royedc4 avatar Apr 26 '17 16:04 Royedc4