Skip to content

Commit ba680d2

Browse files
authored
Merge branch 'main' into feat/added-themes
2 parents 88c44c0 + 4d018e1 commit ba680d2

File tree

7 files changed

+44
-38
lines changed

7 files changed

+44
-38
lines changed

apps/backend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"express-session": "^1.18.0",
2121
"jsonwebtoken": "^9.0.2",
2222
"passport": "^0.7.0",
23-
"passport-facebook": "^3.0.0",
2423
"passport-github2": "^0.1.12",
2524
"passport-google-oauth20": "^2.0.0"
2625
},

apps/backend/src/passport.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const GoogleStrategy = require('passport-google-oauth20').Strategy;
22
const GithubStrategy = require('passport-github2').Strategy;
3-
const FacebookStrategy = require('passport-facebook').Strategy;
43
import passport from 'passport';
54
import dotenv from 'dotenv';
65
import { db } from './db';
@@ -21,18 +20,13 @@ const GITHUB_CLIENT_ID =
2120
process.env.GITHUB_CLIENT_ID || 'your_github_client_id';
2221
const GITHUB_CLIENT_SECRET =
2322
process.env.GITHUB_CLIENT_SECRET || 'your_github_client_secret';
24-
const FACEBOOK_APP_ID = process.env.FACEBOOK_APP_ID || 'your_facebook_app_id';
25-
const FACEBOOK_APP_SECRET =
26-
process.env.FACEBOOK_APP_SECRET || 'your_facebook_app_secret';
2723

2824
export function initPassport() {
2925
if (
3026
!GOOGLE_CLIENT_ID ||
3127
!GOOGLE_CLIENT_SECRET ||
3228
!GITHUB_CLIENT_ID ||
33-
!GITHUB_CLIENT_SECRET ||
34-
!FACEBOOK_APP_ID ||
35-
!FACEBOOK_APP_SECRET
29+
!GITHUB_CLIENT_SECRET
3630
) {
3731
throw new Error(
3832
'Missing environment variables for authentication providers',

apps/backend/src/router/auth.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,4 @@ router.get(
7878
}),
7979
);
8080

81-
router.get(
82-
'/facebook',
83-
passport.authenticate('facebook', { scope: ['profile'] }),
84-
);
85-
86-
router.get(
87-
'/facebook/callback',
88-
passport.authenticate('facebook', {
89-
successRedirect: CLIENT_URL,
90-
failureRedirect: '/login/failed',
91-
}),
92-
);
93-
9481
export default router;

apps/native/app/login/index.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,11 @@ const styles = StyleSheet.create({
6363
},
6464
button2: {
6565
backgroundColor: '#302c2a',
66-
6766
padding: 12,
6867
margin: 10,
6968
borderRadius: 8,
7069
justifyContent: 'center',
7170
},
72-
facebookButton: {
73-
backgroundColor: '#3b5998',
74-
margin: 10,
75-
},
7671
loginText: {
7772
color: '#FFF',
7873
fontSize: 20,
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
Warnings:
3+
4+
- The values [FACEBOOK] on the enum `AuthProvider` will be removed. If these variants are still used in the database, this will fail.
5+
6+
*/
7+
-- AlterEnum
8+
BEGIN;
9+
CREATE TYPE "AuthProvider_new" AS ENUM ('EMAIL', 'GOOGLE', 'GITHUB');
10+
ALTER TABLE "User" ALTER COLUMN "provider" TYPE "AuthProvider_new" USING ("provider"::text::"AuthProvider_new");
11+
ALTER TYPE "AuthProvider" RENAME TO "AuthProvider_old";
12+
ALTER TYPE "AuthProvider_new" RENAME TO "AuthProvider";
13+
DROP TYPE "AuthProvider_old";
14+
COMMIT;

packages/db/prisma/schema.prisma

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,5 @@ enum TimeControl {
8383
enum AuthProvider {
8484
EMAIL
8585
GOOGLE
86-
FACEBOOK
8786
GITHUB
8887
}

yarn.lock

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8669,13 +8669,6 @@ pascal-case@^2.0.0:
86698669
camel-case "^3.0.0"
86708670
upper-case-first "^1.1.0"
86718671

8672-
passport-facebook@^3.0.0:
8673-
version "3.0.0"
8674-
resolved "https://registry.yarnpkg.com/passport-facebook/-/passport-facebook-3.0.0.tgz#b16f7314128be55d020a2b75f574c194bd6d9805"
8675-
integrity sha512-K/qNzuFsFISYAyC1Nma4qgY/12V3RSLFdFVsPKXiKZt434wOvthFW1p7zKa1iQihQMRhaWorVE1o3Vi1o+ZgeQ==
8676-
dependencies:
8677-
passport-oauth2 "1.x.x"
8678-
86798672
passport-github2@^0.1.12:
86808673
version "0.1.12"
86818674
resolved "https://registry.yarnpkg.com/passport-github2/-/passport-github2-0.1.12.tgz#a72ebff4fa52a35bc2c71122dcf470d1116f772c"
@@ -10140,7 +10133,16 @@ strict-uri-encode@^2.0.0:
1014010133
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
1014110134
integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==
1014210135

10143-
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
10136+
"string-width-cjs@npm:string-width@^4.2.0":
10137+
version "4.2.3"
10138+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
10139+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
10140+
dependencies:
10141+
emoji-regex "^8.0.0"
10142+
is-fullwidth-code-point "^3.0.0"
10143+
strip-ansi "^6.0.1"
10144+
10145+
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
1014410146
version "4.2.3"
1014510147
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
1014610148
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -10218,7 +10220,7 @@ string_decoder@~1.1.1:
1021810220
dependencies:
1021910221
safe-buffer "~5.1.0"
1022010222

10221-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
10223+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
1022210224
version "6.0.1"
1022310225
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
1022410226
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -10232,6 +10234,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0:
1023210234
dependencies:
1023310235
ansi-regex "^4.1.0"
1023410236

10237+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
10238+
version "6.0.1"
10239+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
10240+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
10241+
dependencies:
10242+
ansi-regex "^5.0.1"
10243+
1023510244
strip-ansi@^7.0.1:
1023610245
version "7.1.0"
1023710246
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -11227,7 +11236,7 @@ wordwrap@^1.0.0:
1122711236
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
1122811237
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==
1122911238

11230-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
11239+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
1123111240
version "7.0.0"
1123211241
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
1123311242
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -11245,6 +11254,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
1124511254
string-width "^4.1.0"
1124611255
strip-ansi "^6.0.0"
1124711256

11257+
wrap-ansi@^7.0.0:
11258+
version "7.0.0"
11259+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
11260+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
11261+
dependencies:
11262+
ansi-styles "^4.0.0"
11263+
string-width "^4.1.0"
11264+
strip-ansi "^6.0.0"
11265+
1124811266
wrap-ansi@^8.1.0:
1124911267
version "8.1.0"
1125011268
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
@@ -11404,4 +11422,4 @@ zustand@^4.5.2:
1140411422
resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.2.tgz#fddbe7cac1e71d45413b3682cdb47b48034c3848"
1140511423
integrity sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==
1140611424
dependencies:
11407-
use-sync-external-store "1.2.0"
11425+
use-sync-external-store "1.2.0"

0 commit comments

Comments
 (0)