diff --git a/src/auth.js b/src/auth.js
index 8a8583e..d208860 100644
--- a/src/auth.js
+++ b/src/auth.js
@@ -23,10 +23,12 @@ function login(providerName) {
window.db.local.set({ lastAuthProvider: providerName });
})
.catch(function(error) {
- alert(
- 'You have already signed up with the same email using different social login'
- );
utils.log(error);
+ if (error.code === 'auth/account-exists-with-different-credential') {
+ alert(
+ 'You have already signed up with the same email using different social login'
+ );
+ }
});
}
window.login = login;
diff --git a/src/index.html b/src/index.html
index fbf45de..5978081 100644
--- a/src/index.html
+++ b/src/index.html
@@ -98,7 +98,7 @@
Open
-
+
Login/Signup
diff --git a/src/manifest.json b/src/manifest.json
index 7cb38fa..8b41b5c 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -7,7 +7,7 @@
"permissions": ["storage", "tabs", ""],
"optional_permissions": ["downloads"],
"content_security_policy":
- "script-src 'self' filesystem: http://localhost:* https://localhost:* https://ajax.googleapis.com https://code.jquery.com https://cdnjs.cloudflare.com https://unpkg.com https://maxcdn.com https://cdn77.com https://maxcdn.bootstrapcdn.com https://cdn.jsdelivr.net/ https://*.stripe.com/ https://builds.framerjs.com/ https://rawgit.com https://wzrd.in https://www.gstatic.com https://semantic-ui.com https://www.google-analytics.com 'unsafe-eval'; object-src 'self'",
+ "script-src 'self' filesystem: http://localhost:* https://localhost:* https://apis.google.com https://ajax.googleapis.com https://code.jquery.com https://cdnjs.cloudflare.com https://unpkg.com https://maxcdn.com https://cdn77.com https://maxcdn.bootstrapcdn.com https://cdn.jsdelivr.net/ https://*.stripe.com/ https://builds.framerjs.com/ https://rawgit.com https://wzrd.in https://www.gstatic.com https://semantic-ui.com https://www.google-analytics.com 'unsafe-eval'; object-src 'self'",
"options_ui": {
"page": "options.html",
"chrome_style": true
diff --git a/src/script.js b/src/script.js
index ed25efa..e1b6f64 100644
--- a/src/script.js
+++ b/src/script.js
@@ -518,7 +518,7 @@ loginModal, profileModal, profileAvatarImg, profileUserName, openItemsBtn
*/
async function fetchItems(shouldSaveGlobally) {
var d = deferred();
- savedItems = savedItems || {};
+ savedItems = {};
var items = [];
if (window.user) {
items = await itemService.getAllItems();