Reputation: 93
I am trying to use the polymer-fire elements to manage sign-ins on my website, built with Polymer Stater Kit. When clicking a button the signInWithPopup method is called on the firebase-auth element. Although the popup then appears, the link opened in the popup is wrong, which leads to a 404 error.
Since I don't know what causes the error I have created a git repository, where you can look at my code an d try it out
Upvotes: 4
Views: 285
Reputation: 93
The solution was actually to add the following line to sw-precache-config.js:
navigateFallbackWhitelist: [/^(?!\/__)/, ' /getProjectConfig/'],
This prevents the service worker from trying to intercept the auth request.
Upvotes: 0
Reputation: 155
If you read the description from https://beta.webcomponents.org/element/firebase/polymerfire/firebase-auth it tell that you need to be carefull not to intercept request with prefix __ on your service worker if you using Firebase hosting to deploy your app. I put ignoreUrlParametersMatching:[/^__/]
in my sw-precache-config.js like describe here https://github.com/GoogleChrome/sw-precache#ignoreurlparametersmatching-arrayregex
Try to access your web also from different browser. Or restart your browser. It works on me when I try it in Canary after fail on Chrome like you.
Upvotes: 1