Skip to content

Commit e619c8d

Browse files
authored
Merge pull request #41 from CreateThrive/feature/facebook-auth
Feature: Facebook Authentication
2 parents fd78fe1 + f864d1d commit e619c8d

28 files changed

Lines changed: 459 additions & 23 deletions

File tree

database.rules.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"rules": {
33
"users": {
44
"$user": {
5-
".write": "auth !== null && auth.token.email_verified === true && ((auth.token.isAdmin === true && data.child('isAdmin').val() === false) || auth.uid === $user)",
6-
".read": "auth !== null && auth.token.email_verified === true && ((auth.token.isAdmin === true && data.child('isAdmin').val() === false) || auth.uid === $user)"
5+
".write": "auth !== null && (auth.token.email_verified === true || auth.provider === 'facebook') && ((auth.token.isAdmin === true && data.child('isAdmin').val() === false) || auth.uid === $user)",
6+
".read": "auth !== null && (auth.token.email_verified === true || auth.provider === 'facebook') && ((auth.token.isAdmin === true && data.child('isAdmin').val() === false) || auth.uid === $user)"
77
},
8-
".write": "auth !== null && auth.token.email_verified === true && auth.token.isAdmin === true",
9-
".read": "auth !== null && auth.token.email_verified === true && auth.token.isAdmin === true"
8+
".write": "auth !== null && (auth.token.email_verified === true || auth.provider === 'facebook') && auth.token.isAdmin === true",
9+
".read": "auth !== null && (auth.token.email_verified === true || auth.provider === 'facebook') && auth.token.isAdmin === true"
1010
}
1111
}
1212
}

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"dependencies": {
66
"bulma": "^0.8.2",
7+
"bulma-social": "^1.1.1",
78
"classnames": "^2.2.6",
89
"cookies-js": "^1.2.3",
910
"date-fns": "^2.14.0",

src/components/DatePicker/__snapshots__/DatePicker.test.js.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ exports[`<DatePickerStyled /> rendering should render without crashing 1`] = `
4747
"Home.content": "Home content",
4848
"Home.home": "Home",
4949
"Login.email": "E-mail Address",
50+
"Login.facebook": "Continue with Facebook",
5051
"Login.forgotPassword": "Forgot Password?",
52+
"Login.google": "Continue with Google",
5153
"Login.login": "Login",
54+
"Login.microsoft": "Continue with Microsoft",
5255
"Login.password": "Password",
5356
"Login.setNewPassword": "Set your new password",
5457
"Login.setPassword": "Set Password",
@@ -97,10 +100,14 @@ exports[`<DatePickerStyled /> rendering should render without crashing 1`] = `
97100
"Users.permDelete": "This will permanently delete the user. Action can not be undone.",
98101
"Users.search": "Search:",
99102
"Users.users": "Users",
103+
"auth/account-exists-with-different-credential": "Email on another sign in method",
104+
"auth/cancelled-popup-request": "Too many pop ups, just one pop up is allowed",
100105
"auth/email-already-exists": "Email already in use",
101106
"auth/expired-action-code": "The invitation link has expired, get in touch with your administrator",
102107
"auth/invalid-action-code": "The invitation link has expired, get in touch with your administrator",
103108
"auth/invalid-email": "Email is invalid",
109+
"auth/popup-blocked": "Pop up blocked by the browser, please enable pop ups for this page",
110+
"auth/popup-closed-by-user": "Operation cancelled, pop up was closed",
104111
"auth/too-many-requests": "Too many attempts made, try again later",
105112
"auth/user-disabled": "User disabled",
106113
"auth/wrong-password": "Invalid credentials",

src/components/Layout/__snapshots__/Layout.test.js.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ exports[`<Layout /> rendering should render without crashing 1`] = `
4747
"Home.content": "Home content",
4848
"Home.home": "Home",
4949
"Login.email": "E-mail Address",
50+
"Login.facebook": "Continue with Facebook",
5051
"Login.forgotPassword": "Forgot Password?",
52+
"Login.google": "Continue with Google",
5153
"Login.login": "Login",
54+
"Login.microsoft": "Continue with Microsoft",
5255
"Login.password": "Password",
5356
"Login.setNewPassword": "Set your new password",
5457
"Login.setPassword": "Set Password",
@@ -97,10 +100,14 @@ exports[`<Layout /> rendering should render without crashing 1`] = `
97100
"Users.permDelete": "This will permanently delete the user. Action can not be undone.",
98101
"Users.search": "Search:",
99102
"Users.users": "Users",
103+
"auth/account-exists-with-different-credential": "Email on another sign in method",
104+
"auth/cancelled-popup-request": "Too many pop ups, just one pop up is allowed",
100105
"auth/email-already-exists": "Email already in use",
101106
"auth/expired-action-code": "The invitation link has expired, get in touch with your administrator",
102107
"auth/invalid-action-code": "The invitation link has expired, get in touch with your administrator",
103108
"auth/invalid-email": "Email is invalid",
109+
"auth/popup-blocked": "Pop up blocked by the browser, please enable pop ups for this page",
110+
"auth/popup-closed-by-user": "Operation cancelled, pop up was closed",
104111
"auth/too-many-requests": "Too many attempts made, try again later",
105112
"auth/user-disabled": "User disabled",
106113
"auth/wrong-password": "Invalid credentials",

src/components/Navigation/Aside/__snapshots__/Aside.test.js.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ Object {
4848
"Home.content": "Home content",
4949
"Home.home": "Home",
5050
"Login.email": "E-mail Address",
51+
"Login.facebook": "Continue with Facebook",
5152
"Login.forgotPassword": "Forgot Password?",
53+
"Login.google": "Continue with Google",
5254
"Login.login": "Login",
55+
"Login.microsoft": "Continue with Microsoft",
5356
"Login.password": "Password",
5457
"Login.setNewPassword": "Set your new password",
5558
"Login.setPassword": "Set Password",
@@ -98,10 +101,14 @@ Object {
98101
"Users.permDelete": "This will permanently delete the user. Action can not be undone.",
99102
"Users.search": "Search:",
100103
"Users.users": "Users",
104+
"auth/account-exists-with-different-credential": "Email on another sign in method",
105+
"auth/cancelled-popup-request": "Too many pop ups, just one pop up is allowed",
101106
"auth/email-already-exists": "Email already in use",
102107
"auth/expired-action-code": "The invitation link has expired, get in touch with your administrator",
103108
"auth/invalid-action-code": "The invitation link has expired, get in touch with your administrator",
104109
"auth/invalid-email": "Email is invalid",
110+
"auth/popup-blocked": "Pop up blocked by the browser, please enable pop ups for this page",
111+
"auth/popup-closed-by-user": "Operation cancelled, pop up was closed",
105112
"auth/too-many-requests": "Too many attempts made, try again later",
106113
"auth/user-disabled": "User disabled",
107114
"auth/wrong-password": "Invalid credentials",

src/components/Navigation/NavBar/__snapshots__/NavBar.test.js.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ exports[`<NavBar /> rendering should render without crashing 1`] = `
4747
"Home.content": "Home content",
4848
"Home.home": "Home",
4949
"Login.email": "E-mail Address",
50+
"Login.facebook": "Continue with Facebook",
5051
"Login.forgotPassword": "Forgot Password?",
52+
"Login.google": "Continue with Google",
5153
"Login.login": "Login",
54+
"Login.microsoft": "Continue with Microsoft",
5255
"Login.password": "Password",
5356
"Login.setNewPassword": "Set your new password",
5457
"Login.setPassword": "Set Password",
@@ -97,10 +100,14 @@ exports[`<NavBar /> rendering should render without crashing 1`] = `
97100
"Users.permDelete": "This will permanently delete the user. Action can not be undone.",
98101
"Users.search": "Search:",
99102
"Users.users": "Users",
103+
"auth/account-exists-with-different-credential": "Email on another sign in method",
104+
"auth/cancelled-popup-request": "Too many pop ups, just one pop up is allowed",
100105
"auth/email-already-exists": "Email already in use",
101106
"auth/expired-action-code": "The invitation link has expired, get in touch with your administrator",
102107
"auth/invalid-action-code": "The invitation link has expired, get in touch with your administrator",
103108
"auth/invalid-email": "Email is invalid",
109+
"auth/popup-blocked": "Pop up blocked by the browser, please enable pop ups for this page",
110+
"auth/popup-closed-by-user": "Operation cancelled, pop up was closed",
104111
"auth/too-many-requests": "Too many attempts made, try again later",
105112
"auth/user-disabled": "User disabled",
106113
"auth/wrong-password": "Invalid credentials",

src/components/UserForm/__snapshots__/UserForm.test.js.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ exports[`<UserForm /> rendering should render without crashing 1`] = `
4747
"Home.content": "Home content",
4848
"Home.home": "Home",
4949
"Login.email": "E-mail Address",
50+
"Login.facebook": "Continue with Facebook",
5051
"Login.forgotPassword": "Forgot Password?",
52+
"Login.google": "Continue with Google",
5153
"Login.login": "Login",
54+
"Login.microsoft": "Continue with Microsoft",
5255
"Login.password": "Password",
5356
"Login.setNewPassword": "Set your new password",
5457
"Login.setPassword": "Set Password",
@@ -97,10 +100,14 @@ exports[`<UserForm /> rendering should render without crashing 1`] = `
97100
"Users.permDelete": "This will permanently delete the user. Action can not be undone.",
98101
"Users.search": "Search:",
99102
"Users.users": "Users",
103+
"auth/account-exists-with-different-credential": "Email on another sign in method",
104+
"auth/cancelled-popup-request": "Too many pop ups, just one pop up is allowed",
100105
"auth/email-already-exists": "Email already in use",
101106
"auth/expired-action-code": "The invitation link has expired, get in touch with your administrator",
102107
"auth/invalid-action-code": "The invitation link has expired, get in touch with your administrator",
103108
"auth/invalid-email": "Email is invalid",
109+
"auth/popup-blocked": "Pop up blocked by the browser, please enable pop ups for this page",
110+
"auth/popup-closed-by-user": "Operation cancelled, pop up was closed",
104111
"auth/too-many-requests": "Too many attempts made, try again later",
105112
"auth/user-disabled": "User disabled",
106113
"auth/wrong-password": "Invalid credentials",

src/languages/en.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"Login.password": "Password",
88
"Login.setPassword": "Set Password",
99
"Login.forgotPassword": "Forgot Password?",
10+
"Login.facebook": "Continue with Facebook",
11+
"Login.google": "Continue with Google",
12+
"Login.microsoft": "Continue with Microsoft",
1013
"NotFound.404": "Error 404: page not found",
1114
"NotFound.url": "The requested URL {url} was not found",
1215
"NotFound.back": "Go Back",
@@ -77,6 +80,10 @@
7780
"storage/quota-exceeded": "Internal server error, get in touch with your administrator",
7881
"storage/unauthenticated": "Unauthenticated, please authenticate and try again",
7982
"storage/unauthorized": "Unauthorized, you are not authorized to perform this action",
83+
"auth/account-exists-with-different-credential": "Email on another sign in method",
84+
"auth/popup-blocked": "Pop up blocked by the browser, please enable pop ups for this page",
85+
"auth/popup-closed-by-user": "Operation cancelled, pop up was closed",
86+
"auth/cancelled-popup-request": "Too many pop ups, just one pop up is allowed",
8087
"utils.default": "Unknown error, get in touch with your administrator",
8188
"utils.safePassword": "Safe password",
8289
"utils.unsafePassword": "Unsafe password",

src/languages/es.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"Login.password": "Contraseña",
88
"Login.setPassword": "Establecer contraseña",
99
"Login.forgotPassword": "Olvido su contraseña?",
10+
"Login.facebook": "Continuar con Facebook",
11+
"Login.google": "Continuar con Google",
12+
"Login.microsoft": "Continuar con Microsoft",
1013
"NotFound.404": "Error 404: página no encontrada",
1114
"NotFound.url": "El URL {url} no fue encontrado",
1215
"NotFound.back": "Regresar",
@@ -77,6 +80,10 @@
7780
"storage/quota-exceeded": "Error interno del servidor, contáctese con su administrador",
7881
"storage/unauthenticated": "Sin autenticación, por favor autentíquese e intente de nuevo",
7982
"storage/unauthorized": "Sin autorización, no se encuentra autorizado para realizar esta acción",
83+
"auth/account-exists-with-different-credential": "Email en otro método de inicio de sesión",
84+
"auth/popup-blocked": "Pop up bloqueado por el navegador, por favor habilite los pop ups para esta página",
85+
"auth/popup-closed-by-user": "Operacion cancelada, el pop up fue cerrado",
86+
"auth/cancelled-popup-request": "Demasiados pop ups, solamente un pop up es permitido",
8087
"utils.default": "Error desconocido, contáctese con su administrador",
8188
"utils.safePassword": "Contraseña segura",
8289
"utils.unsafePassword": "Contraseña insegura",

0 commit comments

Comments
 (0)