From eb7813ac6f75f47d93a986b1ffb28cd2a6a74807 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 13 Jan 2025 15:56:29 +0100 Subject: [PATCH 1/3] Implement OpenID Connect Authentication Strategy (works with Keycloak, Authentik etc.) --- .env.example | 9 ++ .../pages/auth/_components/social-auth.tsx | 15 ++- apps/server/src/auth/auth.controller.ts | 18 ++++ apps/server/src/auth/auth.module.ts | 30 ++++++ apps/server/src/auth/auth.service.ts | 8 ++ apps/server/src/auth/guards/openid.guard.ts | 5 + .../src/auth/strategy/openid.strategy.ts | 74 ++++++++++++++ apps/server/src/config/schema.ts | 13 ++- apps/server/src/main.ts | 10 ++ libs/dto/src/auth/providers.ts | 2 +- libs/dto/src/user/user.ts | 2 +- package.json | 8 +- pnpm-lock.yaml | 96 ++++++++++++++++--- tools/compose/nginx-proxy-manager.yml | 9 ++ tools/compose/simple.yml | 9 ++ tools/compose/swarm.yml | 9 ++ tools/compose/traefik-secure.yml | 9 ++ tools/compose/traefik.yml | 9 ++ .../migration.sql | 2 + tools/prisma/schema.prisma | 1 + 20 files changed, 320 insertions(+), 18 deletions(-) create mode 100644 apps/server/src/auth/guards/openid.guard.ts create mode 100644 apps/server/src/auth/strategy/openid.strategy.ts create mode 100644 tools/prisma/migrations/20250113145008_add_openid_provider_to_enums/migration.sql diff --git a/.env.example b/.env.example index f9975b9bd..d13a4e184 100644 --- a/.env.example +++ b/.env.example @@ -68,3 +68,12 @@ STORAGE_SKIP_BUCKET_CHECK=false # GOOGLE_CLIENT_ID= # GOOGLE_CLIENT_SECRET= # GOOGLE_CALLBACK_URL=http://localhost:5173/api/auth/google/callback + +# OpenID (Optional) +# OPENID_AUTHORIZATION_URL= +# OPENID_CALLBACK_URL=http://localhost:5173/api/auth/openid/callback +# OPENID_CLIENT_ID= +# OPENID_CLIENT_SECRET= +# OPENID_ISSUER= +# OPENID_TOKEN_URL= +# OPENID_USER_INFO_URL= diff --git a/apps/client/src/pages/auth/_components/social-auth.tsx b/apps/client/src/pages/auth/_components/social-auth.tsx index 6f199d4b8..3b1a63768 100644 --- a/apps/client/src/pages/auth/_components/social-auth.tsx +++ b/apps/client/src/pages/auth/_components/social-auth.tsx @@ -1,5 +1,5 @@ import { t } from "@lingui/macro"; -import { GithubLogo, GoogleLogo } from "@phosphor-icons/react"; +import { Fingerprint, GithubLogo, GoogleLogo } from "@phosphor-icons/react"; import { Button } from "@reactive-resume/ui"; import { useAuthProviders } from "@/client/services/auth/providers"; @@ -32,6 +32,19 @@ export const SocialAuth = () => { )} + + {providers.includes("openid") && ( + + )} ); }; diff --git a/apps/server/src/auth/auth.controller.ts b/apps/server/src/auth/auth.controller.ts index 7308fb1a5..51454ff7d 100644 --- a/apps/server/src/auth/auth.controller.ts +++ b/apps/server/src/auth/auth.controller.ts @@ -35,6 +35,7 @@ import { GitHubGuard } from "./guards/github.guard"; import { GoogleGuard } from "./guards/google.guard"; import { JwtGuard } from "./guards/jwt.guard"; import { LocalGuard } from "./guards/local.guard"; +import { OpenIDGuard } from "./guards/openid.guard"; import { RefreshGuard } from "./guards/refresh.guard"; import { TwoFactorGuard } from "./guards/two-factor.guard"; import { getCookieOptions } from "./utils/cookie"; @@ -147,6 +148,23 @@ export class AuthController { return this.handleAuthenticationResponse(user, response, false, true); } + @ApiTags("OAuth", "OpenID") + @Get("openid") + @UseGuards(OpenIDGuard) + openidLogin() { + return; + } + + @ApiTags("OAuth", "OpenID") + @Get("openid/callback") + @UseGuards(OpenIDGuard) + async openidCallback( + @User() user: UserWithSecrets, + @Res({ passthrough: true }) response: Response, + ) { + return this.handleAuthenticationResponse(user, response, false, true); + } + @Post("refresh") @UseGuards(RefreshGuard) async refresh(@User() user: UserWithSecrets, @Res({ passthrough: true }) response: Response) { diff --git a/apps/server/src/auth/auth.module.ts b/apps/server/src/auth/auth.module.ts index 3ed6593e4..d7ed195d3 100644 --- a/apps/server/src/auth/auth.module.ts +++ b/apps/server/src/auth/auth.module.ts @@ -14,6 +14,7 @@ import { GitHubStrategy } from "./strategy/github.strategy"; import { GoogleStrategy } from "./strategy/google.strategy"; import { JwtStrategy } from "./strategy/jwt.strategy"; import { LocalStrategy } from "./strategy/local.strategy"; +import { OpenIDStrategy } from "./strategy/openid.strategy"; import { RefreshStrategy } from "./strategy/refresh.strategy"; import { TwoFactorStrategy } from "./strategy/two-factor.strategy"; @@ -63,6 +64,35 @@ export class AuthModule { } }, }, + + { + provide: OpenIDStrategy, + inject: [ConfigService, UserService], + useFactory: (configService: ConfigService, userService: UserService) => { + try { + const authorizationURL = configService.getOrThrow("OPENID_AUTHORIZATION_URL"); + const callbackURL = configService.getOrThrow("OPENID_CALLBACK_URL"); + const clientID = configService.getOrThrow("OPENID_CLIENT_ID"); + const clientSecret = configService.getOrThrow("OPENID_CLIENT_SECRET"); + const issuer = configService.getOrThrow("OPENID_ISSUER"); + const tokenURL = configService.getOrThrow("OPENID_TOKEN_URL"); + const userInfoURL = configService.getOrThrow("OPENID_USER_INFO_URL"); + + return new OpenIDStrategy( + authorizationURL, + callbackURL, + clientID, + clientSecret, + issuer, + tokenURL, + userInfoURL, + userService, + ); + } catch { + return new DummyStrategy(); + } + }, + }, ], exports: [AuthService], }; diff --git a/apps/server/src/auth/auth.service.ts b/apps/server/src/auth/auth.service.ts index d444f8295..487f89b7f 100644 --- a/apps/server/src/auth/auth.service.ts +++ b/apps/server/src/auth/auth.service.ts @@ -199,6 +199,14 @@ export class AuthService { providers.push("google"); } + if ( + this.configService.get("OPENID_CLIENT_ID") && + this.configService.get("OPENID_CLIENT_SECRET") && + this.configService.get("OPENID_CALLBACK_URL") + ) { + providers.push("openid"); + } + return providers; } diff --git a/apps/server/src/auth/guards/openid.guard.ts b/apps/server/src/auth/guards/openid.guard.ts new file mode 100644 index 000000000..782dd02d7 --- /dev/null +++ b/apps/server/src/auth/guards/openid.guard.ts @@ -0,0 +1,5 @@ +import { Injectable } from "@nestjs/common"; +import { AuthGuard } from "@nestjs/passport"; + +@Injectable() +export class OpenIDGuard extends AuthGuard("openid") {} diff --git a/apps/server/src/auth/strategy/openid.strategy.ts b/apps/server/src/auth/strategy/openid.strategy.ts new file mode 100644 index 000000000..97cf958e0 --- /dev/null +++ b/apps/server/src/auth/strategy/openid.strategy.ts @@ -0,0 +1,74 @@ +import { BadRequestException, Injectable } from "@nestjs/common"; +import { PassportStrategy } from "@nestjs/passport"; +import { User } from "@prisma/client"; +import { ErrorMessage, processUsername } from "@reactive-resume/utils"; +import { Profile, Strategy, StrategyOptions } from "passport-openidconnect"; + +import { UserService } from "@/server/user/user.service"; + +@Injectable() +export class OpenIDStrategy extends PassportStrategy(Strategy, "openid") { + constructor( + readonly authorizationURL: string, + readonly callbackURL: string, + readonly clientID: string, + readonly clientSecret: string, + readonly issuer: string, + readonly tokenURL: string, + readonly userInfoURL: string, + private readonly userService: UserService, + ) { + super({ + authorizationURL, + callbackURL, + clientID, + clientSecret, + issuer, + tokenURL, + userInfoURL, + scope: "openid email profile", + } as StrategyOptions); + } + + async validate( + issuer: unknown, + profile: Profile, + done: (err?: string | Error | null, user?: Express.User, info?: unknown) => void, + ) { + const { displayName, emails, photos, username } = profile; + + const email = emails?.[0].value ?? `${username}@github.com`; + const picture = photos?.[0].value; + + let user: User | null = null; + + if (!email) throw new BadRequestException(ErrorMessage.InvalidCredentials); + + try { + const user = + (await this.userService.findOneByIdentifier(email)) ?? + (username && (await this.userService.findOneByIdentifier(username))); + + if (!user) throw new Error(ErrorMessage.InvalidCredentials); + + done(null, user); + } catch { + try { + user = await this.userService.create({ + email, + picture, + locale: "en-US", + name: displayName, + provider: "openid", + emailVerified: true, // auto-verify emails + username: processUsername(username ?? email.split("@")[0]), + secrets: { create: {} }, + }); + + done(null, user); + } catch { + throw new BadRequestException(ErrorMessage.UserAlreadyExists); + } + } + } +} diff --git a/apps/server/src/config/schema.ts b/apps/server/src/config/schema.ts index d875c8958..c8cc9c91d 100644 --- a/apps/server/src/config/schema.ts +++ b/apps/server/src/config/schema.ts @@ -63,15 +63,24 @@ export const configSchema = z.object({ .default("false") .transform((s) => s !== "false" && s !== "0"), - // GitHub (OAuth) + // GitHub (OAuth, Optional) GITHUB_CLIENT_ID: z.string().optional(), GITHUB_CLIENT_SECRET: z.string().optional(), GITHUB_CALLBACK_URL: z.string().url().optional(), - // Google (OAuth) + // Google (OAuth, Optional) GOOGLE_CLIENT_ID: z.string().optional(), GOOGLE_CLIENT_SECRET: z.string().optional(), GOOGLE_CALLBACK_URL: z.string().url().optional(), + + // OpenID (Optional) + OPENID_AUTHORIZATION_URL: z.string().url().optional(), + OPENID_CALLBACK_URL: z.string().url().optional(), + OPENID_CLIENT_ID: z.string().optional(), + OPENID_CLIENT_SECRET: z.string().optional(), + OPENID_ISSUER: z.string().optional(), + OPENID_TOKEN_URL: z.string().url().optional(), + OPENID_USER_INFO_URL: z.string().url().optional(), }); export type Config = z.infer; diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts index 3a177f663..7cc7d1bfe 100644 --- a/apps/server/src/main.ts +++ b/apps/server/src/main.ts @@ -4,6 +4,7 @@ import { NestFactory } from "@nestjs/core"; import { NestExpressApplication } from "@nestjs/platform-express"; import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger"; import cookieParser from "cookie-parser"; +import session from "express-session"; import helmet from "helmet"; import { patchNestJsSwagger } from "nestjs-zod"; @@ -21,6 +22,15 @@ async function bootstrap() { // Cookie Parser app.use(cookieParser()); + // Session + app.use( + session({ + resave: false, + saveUninitialized: false, + secret: configService.getOrThrow("ACCESS_TOKEN_SECRET"), + }), + ); + // CORS app.enableCors({ credentials: true, diff --git a/libs/dto/src/auth/providers.ts b/libs/dto/src/auth/providers.ts index 36223fd33..bc4112b09 100644 --- a/libs/dto/src/auth/providers.ts +++ b/libs/dto/src/auth/providers.ts @@ -1,6 +1,6 @@ import { createZodDto } from "nestjs-zod/dto"; import { z } from "zod"; -const authProvidersSchema = z.array(z.enum(["email", "github", "google"])); +const authProvidersSchema = z.array(z.enum(["email", "github", "google", "openid"])); export class AuthProvidersDto extends createZodDto(authProvidersSchema) {} diff --git a/libs/dto/src/user/user.ts b/libs/dto/src/user/user.ts index f4bd9d699..cc63ec205 100644 --- a/libs/dto/src/user/user.ts +++ b/libs/dto/src/user/user.ts @@ -26,7 +26,7 @@ export const userSchema = z.object({ locale: z.string().default("en-US"), emailVerified: z.boolean().default(false), twoFactorEnabled: z.boolean().default(false), - provider: z.enum(["email", "github", "google"]).default("email"), + provider: z.enum(["email", "github", "google", "openid"]).default("email"), createdAt: dateSchema, updatedAt: dateSchema, }); diff --git a/package.json b/package.json index 20c1d2fe7..53eb859a5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@reactive-resume/source", "description": "A free and open-source resume builder that simplifies the process of creating, updating, and sharing your resume.", - "version": "4.3.6", + "version": "4.3.7", "license": "MIT", "private": true, "author": { @@ -62,6 +62,7 @@ "@types/bcryptjs": "^2.4.6", "@types/cookie-parser": "^1.4.8", "@types/express": "^4.17.21", + "@types/express-session": "^1.18.1", "@types/file-saver": "^2.0.7", "@types/jest": "^29.5.14", "@types/lodash.debounce": "^4.0.9", @@ -75,6 +76,7 @@ "@types/passport-github2": "^1.2.9", "@types/passport-google-oauth20": "^2.0.16", "@types/passport-local": "^1.0.38", + "@types/passport-openidconnect": "^0.1.3", "@types/prismjs": "^1.26.5", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", @@ -171,7 +173,7 @@ "@radix-ui/react-visually-hidden": "^1.1.1", "@sindresorhus/slugify": "^2.2.1", "@swc/helpers": "^0.5.15", - "@tanstack/react-query": "^5.64.0", + "@tanstack/react-query": "^5.64.1", "@tiptap/extension-highlight": "^2.11.2", "@tiptap/extension-image": "^2.11.2", "@tiptap/extension-link": "^2.11.2", @@ -191,6 +193,7 @@ "cookie-parser": "^1.4.7", "dayjs": "^1.11.13", "deepmerge": "^4.3.1", + "express-session": "^1.18.1", "file-saver": "^2.0.5", "framer-motion": "^11.17.0", "fuzzy": "^0.1.3", @@ -214,6 +217,7 @@ "passport-google-oauth20": "^2.0.0", "passport-jwt": "^4.0.1", "passport-local": "^1.0.0", + "passport-openidconnect": "^0.1.2", "pdf-lib": "^1.17.1", "prisma": "^5.22.0", "prismjs": "^1.29.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1dfcb1916..2c5478055 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -162,8 +162,8 @@ importers: specifier: ^0.5.15 version: 0.5.15 '@tanstack/react-query': - specifier: ^5.64.0 - version: 5.64.0(react@18.3.1) + specifier: ^5.64.1 + version: 5.64.1(react@18.3.1) '@tiptap/extension-highlight': specifier: ^2.11.2 version: 2.11.2(@tiptap/core@2.11.2(@tiptap/pm@2.11.2)) @@ -221,6 +221,9 @@ importers: deepmerge: specifier: ^4.3.1 version: 4.3.1 + express-session: + specifier: ^1.18.1 + version: 1.18.1 file-saver: specifier: ^2.0.5 version: 2.0.5 @@ -290,6 +293,9 @@ importers: passport-local: specifier: ^1.0.0 version: 1.0.0 + passport-openidconnect: + specifier: ^0.1.2 + version: 0.1.2 pdf-lib: specifier: ^1.17.1 version: 1.17.1 @@ -474,6 +480,9 @@ importers: '@types/express': specifier: ^4.17.21 version: 4.17.21 + '@types/express-session': + specifier: ^1.18.1 + version: 1.18.1 '@types/file-saver': specifier: ^2.0.7 version: 2.0.7 @@ -513,6 +522,9 @@ importers: '@types/passport-local': specifier: ^1.0.38 version: 1.0.38 + '@types/passport-openidconnect': + specifier: ^0.1.3 + version: 0.1.3 '@types/prismjs': specifier: ^1.26.5 version: 1.26.5 @@ -3978,11 +3990,11 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@tanstack/query-core@5.64.0': - resolution: {integrity: sha512-/MPJt/AaaMzdWJZTafgMyYhEX/lGjQrNz8+NDQSk8fNoU5PHqh05FhQaBrEQafW2PeBHsRbefEf//qKMiSAbQQ==} + '@tanstack/query-core@5.64.1': + resolution: {integrity: sha512-978Wx4Wl4UJZbmvU/rkaM9cQtXXrbhK0lsz/UZhYIbyKYA8E4LdomTwyh2GHZ4oU0BKKoDH4YlKk2VscCUgNmg==} - '@tanstack/react-query@5.64.0': - resolution: {integrity: sha512-tBMzlROROUcTDMpDt1NC3n9ndKnJHPB3RCpa6Bf9f31TFvqhLz879x8jldtKU+6IwMSw1Pn4K1AKA+2SYyA6TA==} + '@tanstack/react-query@5.64.1': + resolution: {integrity: sha512-vW5ggHpIO2Yjj44b4sB+Fd3cdnlMJppXRBJkEHvld6FXh3j5dwWJoQo7mGtKI2RbSFyiyu/PhGAy0+Vv5ev9Eg==} peerDependencies: react: ^18 || ^19 @@ -4261,6 +4273,9 @@ packages: '@types/express-serve-static-core@4.17.43': resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==} + '@types/express-session@1.18.1': + resolution: {integrity: sha512-S6TkD/lljxDlQ2u/4A70luD8/ZxZcrU5pQwI1rVXCiaVIywoFgbA+PIUNDjPhQpPdK0dGleLtYc/y7XWBfclBg==} + '@types/express@4.17.21': resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} @@ -4402,6 +4417,9 @@ packages: '@types/passport-oauth2@1.4.15': resolution: {integrity: sha512-9cUTP/HStNSZmhxXGuRrBJfEWzIEJRub2eyJu3CvkA+8HAMc9W3aKdFhVq+Qz1hi42qn+GvSAnz3zwacDSYWpw==} + '@types/passport-openidconnect@0.1.3': + resolution: {integrity: sha512-k1Ni7bG/9OZNo2Qpjg2W6GajL+pww6ZPaNWMXfpteCX4dXf4QgaZLt2hjR5IiPrqwBT9+W8KjCTJ/uhGIoBx/g==} + '@types/passport-strategy@0.2.38': resolution: {integrity: sha512-GC6eMqqojOooq993Tmnmp7AUTbbQSgilyvpCYQjT+H6JfG/g6RGc7nXEniZlp0zyKJ0WUdOiZWLBZft9Yug1uA==} @@ -5600,6 +5618,9 @@ packages: cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + cookie-signature@1.0.7: + resolution: {integrity: sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==} + cookie@0.6.0: resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} engines: {node: '>= 0.6'} @@ -6501,6 +6522,10 @@ packages: resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + express-session@1.18.1: + resolution: {integrity: sha512-a5mtTqEaZvBCL9A9aqkrtfz+3SMDhOVUnjafjo+s7A9Txkq+SVX2DLvSp1Zrv4uCXa3lMSK3viWnh9Gg07PBUA==} + engines: {node: '>= 0.8.0'} + express@4.19.2: resolution: {integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==} engines: {node: '>= 0.10.0'} @@ -8897,6 +8922,10 @@ packages: resolution: {integrity: sha512-cjsQbOrXIDE4P8nNb3FQRCCmJJ/utnFKEz2NX209f7KOHPoX18gF7gBzBbLLsj2/je4KrgiwLLGjf0lm9rtTBA==} engines: {node: '>= 0.4.0'} + passport-openidconnect@0.1.2: + resolution: {integrity: sha512-JX3rTyW+KFZ/E9OF/IpXJPbyLO9vGzcmXB5FgSP2jfL3LGKJPdV7zUE8rWeKeeI/iueQggOeFa3onrCmhxXZTg==} + engines: {node: '>= 0.6.0'} + passport-strategy@1.0.0: resolution: {integrity: sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==} engines: {node: '>= 0.4.0'} @@ -9614,6 +9643,10 @@ packages: ramda@0.27.2: resolution: {integrity: sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA==} + random-bytes@1.0.0: + resolution: {integrity: sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==} + engines: {node: '>= 0.8'} + randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} @@ -10891,6 +10924,10 @@ packages: engines: {node: '>=0.8.0'} hasBin: true + uid-safe@2.1.5: + resolution: {integrity: sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==} + engines: {node: '>= 0.8'} + uid2@0.0.4: resolution: {integrity: sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA==} @@ -12739,7 +12776,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.6 + debug: 4.4.0 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -12808,7 +12845,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.6 + debug: 4.4.0 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -15661,11 +15698,11 @@ snapshots: - supports-color - typescript - '@tanstack/query-core@5.64.0': {} + '@tanstack/query-core@5.64.1': {} - '@tanstack/react-query@5.64.0(react@18.3.1)': + '@tanstack/react-query@5.64.1(react@18.3.1)': dependencies: - '@tanstack/query-core': 5.64.0 + '@tanstack/query-core': 5.64.1 react: 18.3.1 '@testing-library/dom@10.1.0': @@ -15984,6 +16021,10 @@ snapshots: '@types/range-parser': 1.2.7 '@types/send': 0.17.4 + '@types/express-session@1.18.1': + dependencies: + '@types/express': 4.17.21 + '@types/express@4.17.21': dependencies: '@types/body-parser': 1.19.5 @@ -16164,6 +16205,13 @@ snapshots: '@types/oauth': 0.9.4 '@types/passport': 1.0.17 + '@types/passport-openidconnect@0.1.3': + dependencies: + '@types/express': 4.17.21 + '@types/oauth': 0.9.4 + '@types/passport': 1.0.17 + '@types/passport-strategy': 0.2.38 + '@types/passport-strategy@0.2.38': dependencies: '@types/express': 4.17.21 @@ -17621,6 +17669,8 @@ snapshots: cookie-signature@1.0.6: {} + cookie-signature@1.0.7: {} + cookie@0.6.0: {} cookie@0.7.1: {} @@ -18737,6 +18787,19 @@ snapshots: jest-message-util: 29.7.0 jest-util: 29.7.0 + express-session@1.18.1: + dependencies: + cookie: 0.7.2 + cookie-signature: 1.0.7 + debug: 2.6.9 + depd: 2.0.0 + on-headers: 1.0.2 + parseurl: 1.3.3 + safe-buffer: 5.2.1 + uid-safe: 2.1.5 + transitivePeerDependencies: + - supports-color + express@4.19.2: dependencies: accepts: 1.3.8 @@ -21918,6 +21981,11 @@ snapshots: uid2: 0.0.4 utils-merge: 1.0.1 + passport-openidconnect@0.1.2: + dependencies: + oauth: 0.10.0 + passport-strategy: 1.0.0 + passport-strategy@1.0.0: {} passport@0.7.0: @@ -22646,6 +22714,8 @@ snapshots: ramda@0.27.2: {} + random-bytes@1.0.0: {} + randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 @@ -24117,6 +24187,10 @@ snapshots: uglify-js@3.17.4: optional: true + uid-safe@2.1.5: + dependencies: + random-bytes: 1.0.0 + uid2@0.0.4: {} uid@2.0.2: diff --git a/tools/compose/nginx-proxy-manager.yml b/tools/compose/nginx-proxy-manager.yml index 61b4d8113..6eec0723b 100644 --- a/tools/compose/nginx-proxy-manager.yml +++ b/tools/compose/nginx-proxy-manager.yml @@ -107,6 +107,15 @@ services: # GOOGLE_CLIENT_SECRET: google_client_secret # GOOGLE_CALLBACK_URL: https://example.com/api/auth/google/callback + # -- OpenID (Optional) -- + # OPENID_AUTHORIZATION_URL: + # OPENID_CALLBACK_URL: https://example.com/api/auth/openid/callback + # OPENID_CLIENT_ID: + # OPENID_CLIENT_SECRET: + # OPENID_ISSUER: + # OPENID_TOKEN_URL: + # OPENID_USER_INFO_URL: + nginx: image: jc21/nginx-proxy-manager restart: always diff --git a/tools/compose/simple.yml b/tools/compose/simple.yml index e099b5b2b..6ad6da8d1 100644 --- a/tools/compose/simple.yml +++ b/tools/compose/simple.yml @@ -106,6 +106,15 @@ services: # GOOGLE_CLIENT_SECRET: google_client_secret # GOOGLE_CALLBACK_URL: http://localhost:3000/api/auth/google/callback + # -- OpenID (Optional) -- + # OPENID_AUTHORIZATION_URL: + # OPENID_CALLBACK_URL: http://localhost:3000/api/auth/openid/callback + # OPENID_CLIENT_ID: + # OPENID_CLIENT_SECRET: + # OPENID_ISSUER: + # OPENID_TOKEN_URL: + # OPENID_USER_INFO_URL: + volumes: minio_data: postgres_data: diff --git a/tools/compose/swarm.yml b/tools/compose/swarm.yml index 65a54a183..46b3d9787 100644 --- a/tools/compose/swarm.yml +++ b/tools/compose/swarm.yml @@ -125,6 +125,15 @@ services: # GOOGLE_CLIENT_ID: google_client_id # GOOGLE_CLIENT_SECRET: google_client_secret # GOOGLE_CALLBACK_URL: https://example.com/api/auth/google/callback + + # -- OpenID (Optional) -- + # OPENID_AUTHORIZATION_URL: + # OPENID_CALLBACK_URL: https://example.com/api/auth/openid/callback + # OPENID_CLIENT_ID: + # OPENID_CLIENT_SECRET: + # OPENID_ISSUER: + # OPENID_TOKEN_URL: + # OPENID_USER_INFO_URL: deploy: replicas: 2 restart_policy: diff --git a/tools/compose/traefik-secure.yml b/tools/compose/traefik-secure.yml index 2fd598ad2..802c591c4 100644 --- a/tools/compose/traefik-secure.yml +++ b/tools/compose/traefik-secure.yml @@ -114,6 +114,15 @@ services: # GOOGLE_CLIENT_ID: google_client_id # GOOGLE_CLIENT_SECRET: google_client_secret # GOOGLE_CALLBACK_URL: https://example.com/api/auth/google/callback + + # -- OpenID (Optional) -- + # OPENID_AUTHORIZATION_URL: + # OPENID_CALLBACK_URL: https://example.com/api/auth/openid/callback + # OPENID_CLIENT_ID: + # OPENID_CLIENT_SECRET: + # OPENID_ISSUER: + # OPENID_TOKEN_URL: + # OPENID_USER_INFO_URL: labels: - traefik.enable=true - traefik.http.routers.app.rule=Host(`example.com`) diff --git a/tools/compose/traefik.yml b/tools/compose/traefik.yml index d2bb04f68..599dbe72e 100644 --- a/tools/compose/traefik.yml +++ b/tools/compose/traefik.yml @@ -110,6 +110,15 @@ services: # GOOGLE_CLIENT_ID: google_client_id # GOOGLE_CLIENT_SECRET: google_client_secret # GOOGLE_CALLBACK_URL: http://example.com/api/auth/google/callback + + # -- OpenID (Optional) -- + # OPENID_AUTHORIZATION_URL: + # OPENID_CALLBACK_URL: http://example.com/api/auth/openid/callback + # OPENID_CLIENT_ID: + # OPENID_CLIENT_SECRET: + # OPENID_ISSUER: + # OPENID_TOKEN_URL: + # OPENID_USER_INFO_URL: labels: - traefik.enable=true - traefik.http.routers.app.rule=Host(`example.com`) diff --git a/tools/prisma/migrations/20250113145008_add_openid_provider_to_enums/migration.sql b/tools/prisma/migrations/20250113145008_add_openid_provider_to_enums/migration.sql new file mode 100644 index 000000000..5f4dc8e68 --- /dev/null +++ b/tools/prisma/migrations/20250113145008_add_openid_provider_to_enums/migration.sql @@ -0,0 +1,2 @@ +-- AlterEnum +ALTER TYPE "Provider" ADD VALUE 'openid'; diff --git a/tools/prisma/schema.prisma b/tools/prisma/schema.prisma index c05adb0ac..a06de5a2a 100644 --- a/tools/prisma/schema.prisma +++ b/tools/prisma/schema.prisma @@ -11,6 +11,7 @@ enum Provider { email github google + openid } enum Visibility { From 33cb3dbd6a32ffc41097e9eadae983e1f220731b Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 13 Jan 2025 16:04:27 +0100 Subject: [PATCH 2/3] ensure secure cookies are used in express-session --- apps/client/src/locales/af-ZA/messages.po | 6 +++++- apps/client/src/locales/am-ET/messages.po | 6 +++++- apps/client/src/locales/ar-SA/messages.po | 6 +++++- apps/client/src/locales/bg-BG/messages.po | 6 +++++- apps/client/src/locales/bn-BD/messages.po | 6 +++++- apps/client/src/locales/ca-ES/messages.po | 6 +++++- apps/client/src/locales/cs-CZ/messages.po | 6 +++++- apps/client/src/locales/da-DK/messages.po | 6 +++++- apps/client/src/locales/de-DE/messages.po | 6 +++++- apps/client/src/locales/el-GR/messages.po | 6 +++++- apps/client/src/locales/en-US/messages.po | 4 ++++ apps/client/src/locales/es-ES/messages.po | 6 +++++- apps/client/src/locales/fa-IR/messages.po | 6 +++++- apps/client/src/locales/fi-FI/messages.po | 6 +++++- apps/client/src/locales/fr-FR/messages.po | 6 +++++- apps/client/src/locales/he-IL/messages.po | 6 +++++- apps/client/src/locales/hi-IN/messages.po | 6 +++++- apps/client/src/locales/hu-HU/messages.po | 6 +++++- apps/client/src/locales/id-ID/messages.po | 6 +++++- apps/client/src/locales/it-IT/messages.po | 6 +++++- apps/client/src/locales/ja-JP/messages.po | 6 +++++- apps/client/src/locales/km-KH/messages.po | 6 +++++- apps/client/src/locales/kn-IN/messages.po | 6 +++++- apps/client/src/locales/ko-KR/messages.po | 6 +++++- apps/client/src/locales/lt-LT/messages.po | 6 +++++- apps/client/src/locales/lv-LV/messages.po | 6 +++++- apps/client/src/locales/ml-IN/messages.po | 6 +++++- apps/client/src/locales/mr-IN/messages.po | 6 +++++- apps/client/src/locales/ms-MY/messages.po | 6 +++++- apps/client/src/locales/ne-NP/messages.po | 6 +++++- apps/client/src/locales/nl-NL/messages.po | 6 +++++- apps/client/src/locales/no-NO/messages.po | 6 +++++- apps/client/src/locales/or-IN/messages.po | 6 +++++- apps/client/src/locales/pl-PL/messages.po | 6 +++++- apps/client/src/locales/pt-BR/messages.po | 6 +++++- apps/client/src/locales/pt-PT/messages.po | 6 +++++- apps/client/src/locales/ro-RO/messages.po | 6 +++++- apps/client/src/locales/ru-RU/messages.po | 6 +++++- apps/client/src/locales/sk-SK/messages.po | 6 +++++- apps/client/src/locales/sq-AL/messages.po | 6 +++++- apps/client/src/locales/sr-SP/messages.po | 6 +++++- apps/client/src/locales/sv-SE/messages.po | 6 +++++- apps/client/src/locales/ta-IN/messages.po | 6 +++++- apps/client/src/locales/te-IN/messages.po | 6 +++++- apps/client/src/locales/th-TH/messages.po | 6 +++++- apps/client/src/locales/tr-TR/messages.po | 6 +++++- apps/client/src/locales/uk-UA/messages.po | 6 +++++- apps/client/src/locales/uz-UZ/messages.po | 6 +++++- apps/client/src/locales/vi-VN/messages.po | 6 +++++- apps/client/src/locales/zh-CN/messages.po | 6 +++++- apps/client/src/locales/zh-TW/messages.po | 6 +++++- apps/server/src/main.ts | 1 + 52 files changed, 255 insertions(+), 50 deletions(-) diff --git a/apps/client/src/locales/af-ZA/messages.po b/apps/client/src/locales/af-ZA/messages.po index 49e702ed2..efddb0466 100644 --- a/apps/client/src/locales/af-ZA/messages.po +++ b/apps/client/src/locales/af-ZA/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: af\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:38\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Afrikaans\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/am-ET/messages.po b/apps/client/src/locales/am-ET/messages.po index a6b14926f..d6623976a 100644 --- a/apps/client/src/locales/am-ET/messages.po +++ b/apps/client/src/locales/am-ET/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: am\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:38\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Amharic\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ar-SA/messages.po b/apps/client/src/locales/ar-SA/messages.po index 1c4c90620..1c55714d2 100644 --- a/apps/client/src/locales/ar-SA/messages.po +++ b/apps/client/src/locales/ar-SA/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ar\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Arabic\n" "Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n" @@ -1017,6 +1017,10 @@ msgstr "مفتاح OpenAI/Ollama API" msgid "OpenAI/Ollama Integration" msgstr "تكامل OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/bg-BG/messages.po b/apps/client/src/locales/bg-BG/messages.po index c659f90f2..73c9c2c14 100644 --- a/apps/client/src/locales/bg-BG/messages.po +++ b/apps/client/src/locales/bg-BG/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: bg\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Bulgarian\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "Ключ за API на OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Интеграция на OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/bn-BD/messages.po b/apps/client/src/locales/bn-BD/messages.po index 80ed8c77d..72d227002 100644 --- a/apps/client/src/locales/bn-BD/messages.po +++ b/apps/client/src/locales/bn-BD/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: bn\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:38\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Bengali\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ca-ES/messages.po b/apps/client/src/locales/ca-ES/messages.po index 1f1b5c93e..cfb06065e 100644 --- a/apps/client/src/locales/ca-ES/messages.po +++ b/apps/client/src/locales/ca-ES/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ca\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:38\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Catalan\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/cs-CZ/messages.po b/apps/client/src/locales/cs-CZ/messages.po index 1dc87b692..cc025c19a 100644 --- a/apps/client/src/locales/cs-CZ/messages.po +++ b/apps/client/src/locales/cs-CZ/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: cs\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Czech\n" "Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n" @@ -1017,6 +1017,10 @@ msgstr "Klíč API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Integrace OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/da-DK/messages.po b/apps/client/src/locales/da-DK/messages.po index d5fad37dd..49b0fe7fa 100644 --- a/apps/client/src/locales/da-DK/messages.po +++ b/apps/client/src/locales/da-DK/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: da\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Danish\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API-nøgle" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama-integration" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/de-DE/messages.po b/apps/client/src/locales/de-DE/messages.po index 33cf4e3d9..bea60560a 100644 --- a/apps/client/src/locales/de-DE/messages.po +++ b/apps/client/src/locales/de-DE/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: de\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: German\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API-Schlüssel" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama Integration" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/el-GR/messages.po b/apps/client/src/locales/el-GR/messages.po index fcae93635..d09dd11fc 100644 --- a/apps/client/src/locales/el-GR/messages.po +++ b/apps/client/src/locales/el-GR/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: el\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Greek\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "Κλειδί API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Ενσωμάτωση OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/en-US/messages.po b/apps/client/src/locales/en-US/messages.po index 32bd3fce9..ca571f905 100644 --- a/apps/client/src/locales/en-US/messages.po +++ b/apps/client/src/locales/en-US/messages.po @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API Key" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama Integration" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "OpenID" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/es-ES/messages.po b/apps/client/src/locales/es-ES/messages.po index 28d51dd82..4f39eca91 100644 --- a/apps/client/src/locales/es-ES/messages.po +++ b/apps/client/src/locales/es-ES/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: es\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Spanish\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "Clave API de OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Integración OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/fa-IR/messages.po b/apps/client/src/locales/fa-IR/messages.po index 95db55121..3441e0333 100644 --- a/apps/client/src/locales/fa-IR/messages.po +++ b/apps/client/src/locales/fa-IR/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: fa\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Persian\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/fi-FI/messages.po b/apps/client/src/locales/fi-FI/messages.po index 5052ec4fa..d2de49e9d 100644 --- a/apps/client/src/locales/fi-FI/messages.po +++ b/apps/client/src/locales/fi-FI/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: fi\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Finnish\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API-avain" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama-integraatio" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/fr-FR/messages.po b/apps/client/src/locales/fr-FR/messages.po index d982073b7..395c6cbb0 100644 --- a/apps/client/src/locales/fr-FR/messages.po +++ b/apps/client/src/locales/fr-FR/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: fr\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: French\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" @@ -1017,6 +1017,10 @@ msgstr "Clé API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Intégration OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/he-IL/messages.po b/apps/client/src/locales/he-IL/messages.po index 69984a777..f4fe7c302 100644 --- a/apps/client/src/locales/he-IL/messages.po +++ b/apps/client/src/locales/he-IL/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: he\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:38\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Hebrew\n" "Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/hi-IN/messages.po b/apps/client/src/locales/hi-IN/messages.po index b0bc36be6..38047d6bb 100644 --- a/apps/client/src/locales/hi-IN/messages.po +++ b/apps/client/src/locales/hi-IN/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: hi\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Hindi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/hu-HU/messages.po b/apps/client/src/locales/hu-HU/messages.po index 4522ee000..d65a85e89 100644 --- a/apps/client/src/locales/hu-HU/messages.po +++ b/apps/client/src/locales/hu-HU/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: hu\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Hungarian\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API kulcs" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama integráció" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/id-ID/messages.po b/apps/client/src/locales/id-ID/messages.po index c54bf16f3..de45e4d4c 100644 --- a/apps/client/src/locales/id-ID/messages.po +++ b/apps/client/src/locales/id-ID/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: id\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Indonesian\n" "Plural-Forms: nplurals=1; plural=0;\n" @@ -1017,6 +1017,10 @@ msgstr "Kunci API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Integrasi OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/it-IT/messages.po b/apps/client/src/locales/it-IT/messages.po index f546c4cb3..717dfbcf9 100644 --- a/apps/client/src/locales/it-IT/messages.po +++ b/apps/client/src/locales/it-IT/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: it\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Italian\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "Chiave API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Integrazione OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ja-JP/messages.po b/apps/client/src/locales/ja-JP/messages.po index 4895e9820..e4660d4d9 100644 --- a/apps/client/src/locales/ja-JP/messages.po +++ b/apps/client/src/locales/ja-JP/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ja\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Japanese\n" "Plural-Forms: nplurals=1; plural=0;\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/OllamaのAPIキー" msgid "OpenAI/Ollama Integration" msgstr "OpenAIとOllamaの統合" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/km-KH/messages.po b/apps/client/src/locales/km-KH/messages.po index c15b467e2..e14984c7e 100644 --- a/apps/client/src/locales/km-KH/messages.po +++ b/apps/client/src/locales/km-KH/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: km\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Khmer\n" "Plural-Forms: nplurals=1; plural=0;\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/kn-IN/messages.po b/apps/client/src/locales/kn-IN/messages.po index bfd5b5167..20668c9c7 100644 --- a/apps/client/src/locales/kn-IN/messages.po +++ b/apps/client/src/locales/kn-IN/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: kn\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Kannada\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ko-KR/messages.po b/apps/client/src/locales/ko-KR/messages.po index 29e93504c..7ea18fed6 100644 --- a/apps/client/src/locales/ko-KR/messages.po +++ b/apps/client/src/locales/ko-KR/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ko\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Korean\n" "Plural-Forms: nplurals=1; plural=0;\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/올라마 API 키" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/올라마 통합" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/lt-LT/messages.po b/apps/client/src/locales/lt-LT/messages.po index 43325d255..c47b9e224 100644 --- a/apps/client/src/locales/lt-LT/messages.po +++ b/apps/client/src/locales/lt-LT/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: lt\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Lithuanian\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && (n%100>19 || n%100<11) ? 0 : (n%10>=2 && n%10<=9) && (n%100>19 || n%100<11) ? 1 : n%1!=0 ? 2: 3);\n" @@ -1017,6 +1017,10 @@ msgstr "\"OpenAI/Ollama\" API raktas" msgid "OpenAI/Ollama Integration" msgstr "\"OpenAI/Ollama\" integracija" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/lv-LV/messages.po b/apps/client/src/locales/lv-LV/messages.po index 0e166a941..1ddd725fe 100644 --- a/apps/client/src/locales/lv-LV/messages.po +++ b/apps/client/src/locales/lv-LV/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: lv\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Latvian\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2;\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API atslēga" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama integrācija" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ml-IN/messages.po b/apps/client/src/locales/ml-IN/messages.po index b544da5f4..78ab3bd7a 100644 --- a/apps/client/src/locales/ml-IN/messages.po +++ b/apps/client/src/locales/ml-IN/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ml\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Malayalam\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/mr-IN/messages.po b/apps/client/src/locales/mr-IN/messages.po index 12e1b3939..de3935fa9 100644 --- a/apps/client/src/locales/mr-IN/messages.po +++ b/apps/client/src/locales/mr-IN/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: mr\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Marathi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ms-MY/messages.po b/apps/client/src/locales/ms-MY/messages.po index bd79c0962..e0e7c6129 100644 --- a/apps/client/src/locales/ms-MY/messages.po +++ b/apps/client/src/locales/ms-MY/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ms\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Malay\n" "Plural-Forms: nplurals=1; plural=0;\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ne-NP/messages.po b/apps/client/src/locales/ne-NP/messages.po index ad0cc57e1..86ca6fb24 100644 --- a/apps/client/src/locales/ne-NP/messages.po +++ b/apps/client/src/locales/ne-NP/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ne\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Nepali\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/nl-NL/messages.po b/apps/client/src/locales/nl-NL/messages.po index 693d954d1..da4bba5cf 100644 --- a/apps/client/src/locales/nl-NL/messages.po +++ b/apps/client/src/locales/nl-NL/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: nl\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Dutch\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API sleutel" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama Integratie" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/no-NO/messages.po b/apps/client/src/locales/no-NO/messages.po index 23141eba9..0cbe68724 100644 --- a/apps/client/src/locales/no-NO/messages.po +++ b/apps/client/src/locales/no-NO/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: no\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Norwegian\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/or-IN/messages.po b/apps/client/src/locales/or-IN/messages.po index b3401e1b2..eaccd0697 100644 --- a/apps/client/src/locales/or-IN/messages.po +++ b/apps/client/src/locales/or-IN/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: or\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Odia\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/pl-PL/messages.po b/apps/client/src/locales/pl-PL/messages.po index bceda83c5..a539073fa 100644 --- a/apps/client/src/locales/pl-PL/messages.po +++ b/apps/client/src/locales/pl-PL/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: pl\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Polish\n" "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" @@ -1017,6 +1017,10 @@ msgstr "Klucz API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Integracja OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/pt-BR/messages.po b/apps/client/src/locales/pt-BR/messages.po index 9c6658b7f..6499a188e 100644 --- a/apps/client/src/locales/pt-BR/messages.po +++ b/apps/client/src/locales/pt-BR/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: pt\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Portuguese, Brazilian\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "Chave de API da OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Integração OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/pt-PT/messages.po b/apps/client/src/locales/pt-PT/messages.po index 9d7505706..8d4058061 100644 --- a/apps/client/src/locales/pt-PT/messages.po +++ b/apps/client/src/locales/pt-PT/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: pt\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Portuguese\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "Chave da API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Integração OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ro-RO/messages.po b/apps/client/src/locales/ro-RO/messages.po index 95d7ffcd2..687084c27 100644 --- a/apps/client/src/locales/ro-RO/messages.po +++ b/apps/client/src/locales/ro-RO/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ro\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Romanian\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100>0 && n%100<20)) ? 1 : 2);\n" @@ -1017,6 +1017,10 @@ msgstr "Cheie API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Integrarea OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ru-RU/messages.po b/apps/client/src/locales/ru-RU/messages.po index 41c382d2a..8e02c2d28 100644 --- a/apps/client/src/locales/ru-RU/messages.po +++ b/apps/client/src/locales/ru-RU/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ru\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Russian\n" "Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" @@ -1017,6 +1017,10 @@ msgstr "Ключ API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Интеграция OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/sk-SK/messages.po b/apps/client/src/locales/sk-SK/messages.po index bbe1b012f..1556b2d80 100644 --- a/apps/client/src/locales/sk-SK/messages.po +++ b/apps/client/src/locales/sk-SK/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: sk\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Slovak\n" "Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n" @@ -1017,6 +1017,10 @@ msgstr "Kľúč API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Integrácia OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/sq-AL/messages.po b/apps/client/src/locales/sq-AL/messages.po index adf65164e..64d114636 100644 --- a/apps/client/src/locales/sq-AL/messages.po +++ b/apps/client/src/locales/sq-AL/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: sq\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:38\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Albanian\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/sr-SP/messages.po b/apps/client/src/locales/sr-SP/messages.po index 02f7838b0..d43de532d 100644 --- a/apps/client/src/locales/sr-SP/messages.po +++ b/apps/client/src/locales/sr-SP/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: sr\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Serbian (Cyrillic)\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/sv-SE/messages.po b/apps/client/src/locales/sv-SE/messages.po index 5652c0829..1ceb13688 100644 --- a/apps/client/src/locales/sv-SE/messages.po +++ b/apps/client/src/locales/sv-SE/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: sv\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Swedish\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API-nyckel" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama-integrering" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/ta-IN/messages.po b/apps/client/src/locales/ta-IN/messages.po index 3b53927ce..2f7ab68e2 100644 --- a/apps/client/src/locales/ta-IN/messages.po +++ b/apps/client/src/locales/ta-IN/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: ta\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Tamil\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/te-IN/messages.po b/apps/client/src/locales/te-IN/messages.po index 0e11bc411..6546b539f 100644 --- a/apps/client/src/locales/te-IN/messages.po +++ b/apps/client/src/locales/te-IN/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: te\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Telugu\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/th-TH/messages.po b/apps/client/src/locales/th-TH/messages.po index 14590b196..1674f8681 100644 --- a/apps/client/src/locales/th-TH/messages.po +++ b/apps/client/src/locales/th-TH/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: th\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Thai\n" "Plural-Forms: nplurals=1; plural=0;\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/tr-TR/messages.po b/apps/client/src/locales/tr-TR/messages.po index 93c29482c..de5756e22 100644 --- a/apps/client/src/locales/tr-TR/messages.po +++ b/apps/client/src/locales/tr-TR/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: tr\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Turkish\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API Anahtarı" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama Entegrasyonu" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/uk-UA/messages.po b/apps/client/src/locales/uk-UA/messages.po index a8ffec4d3..fcc2e5413 100644 --- a/apps/client/src/locales/uk-UA/messages.po +++ b/apps/client/src/locales/uk-UA/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: uk\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Ukrainian\n" "Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" @@ -1017,6 +1017,10 @@ msgstr "Ключ API OpenAI/Ollama" msgid "OpenAI/Ollama Integration" msgstr "Інтеграція OpenAI/Ollama" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/uz-UZ/messages.po b/apps/client/src/locales/uz-UZ/messages.po index 817a48910..131c77979 100644 --- a/apps/client/src/locales/uz-UZ/messages.po +++ b/apps/client/src/locales/uz-UZ/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: uz\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Uzbek\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/vi-VN/messages.po b/apps/client/src/locales/vi-VN/messages.po index 1c68d0202..c3deb4b07 100644 --- a/apps/client/src/locales/vi-VN/messages.po +++ b/apps/client/src/locales/vi-VN/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: vi\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:39\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Vietnamese\n" "Plural-Forms: nplurals=1; plural=0;\n" @@ -1017,6 +1017,10 @@ msgstr "" msgid "OpenAI/Ollama Integration" msgstr "" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/zh-CN/messages.po b/apps/client/src/locales/zh-CN/messages.po index 17048a801..4aa5afc16 100644 --- a/apps/client/src/locales/zh-CN/messages.po +++ b/apps/client/src/locales/zh-CN/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: zh\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Plural-Forms: nplurals=1; plural=0;\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API 密钥" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama 集成" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/client/src/locales/zh-TW/messages.po b/apps/client/src/locales/zh-TW/messages.po index f8e1e290a..11f64bf61 100644 --- a/apps/client/src/locales/zh-TW/messages.po +++ b/apps/client/src/locales/zh-TW/messages.po @@ -8,7 +8,7 @@ msgstr "" "Language: zh\n" "Project-Id-Version: reactive-resume\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-13 00:50\n" +"PO-Revision-Date: 2025-01-13 15:03\n" "Last-Translator: \n" "Language-Team: Chinese Traditional\n" "Plural-Forms: nplurals=1; plural=0;\n" @@ -1017,6 +1017,10 @@ msgstr "OpenAI/Ollama API 金鑰" msgid "OpenAI/Ollama Integration" msgstr "OpenAI/Ollama 整合" +#: apps/client/src/pages/auth/_components/social-auth.tsx:44 +msgid "OpenID" +msgstr "" + #: apps/client/src/pages/builder/sidebars/right/sections/page.tsx:67 #: apps/client/src/pages/builder/sidebars/right/sections/typography.tsx:168 msgid "Options" diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts index 7cc7d1bfe..cc0639260 100644 --- a/apps/server/src/main.ts +++ b/apps/server/src/main.ts @@ -28,6 +28,7 @@ async function bootstrap() { resave: false, saveUninitialized: false, secret: configService.getOrThrow("ACCESS_TOKEN_SECRET"), + cookie: { httpOnly: true, secure: process.env.NODE_ENV === "production" }, }), ); From 227870ac781c07c23854218b2d0cda2349bec015 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 13 Jan 2025 16:22:29 +0100 Subject: [PATCH 3/3] fix issues suggested by coderabbit --- apps/server/src/auth/auth.service.ts | 4 ++++ apps/server/src/auth/strategy/github.strategy.ts | 6 +++--- apps/server/src/auth/strategy/google.strategy.ts | 6 +++--- apps/server/src/auth/strategy/openid.strategy.ts | 8 ++++---- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/server/src/auth/auth.service.ts b/apps/server/src/auth/auth.service.ts index 487f89b7f..122df9a39 100644 --- a/apps/server/src/auth/auth.service.ts +++ b/apps/server/src/auth/auth.service.ts @@ -200,6 +200,10 @@ export class AuthService { } if ( + this.configService.get("OPENID_AUTHORIZATION_URL") && + this.configService.get("OPENID_ISSUER") && + this.configService.get("OPENID_TOKEN_URL") && + this.configService.get("OPENID_USER_INFO_URL") && this.configService.get("OPENID_CLIENT_ID") && this.configService.get("OPENID_CLIENT_SECRET") && this.configService.get("OPENID_CALLBACK_URL") diff --git a/apps/server/src/auth/strategy/github.strategy.ts b/apps/server/src/auth/strategy/github.strategy.ts index 7425c6de5..f258a3726 100644 --- a/apps/server/src/auth/strategy/github.strategy.ts +++ b/apps/server/src/auth/strategy/github.strategy.ts @@ -33,11 +33,11 @@ export class GitHubStrategy extends PassportStrategy(Strategy, "github") { if (!email) throw new BadRequestException(ErrorMessage.InvalidCredentials); try { - const user = + user = (await this.userService.findOneByIdentifier(email)) ?? - (username && (await this.userService.findOneByIdentifier(username))); + (username ? await this.userService.findOneByIdentifier(username) : null); - if (!user) throw new Error(ErrorMessage.InvalidCredentials); + if (!user) throw new BadRequestException(ErrorMessage.InvalidCredentials); done(null, user); } catch { diff --git a/apps/server/src/auth/strategy/google.strategy.ts b/apps/server/src/auth/strategy/google.strategy.ts index ff446d4b2..9c06c6541 100644 --- a/apps/server/src/auth/strategy/google.strategy.ts +++ b/apps/server/src/auth/strategy/google.strategy.ts @@ -33,11 +33,11 @@ export class GoogleStrategy extends PassportStrategy(Strategy, "google") { if (!email) throw new BadRequestException(ErrorMessage.InvalidCredentials); try { - const user = + user = (await this.userService.findOneByIdentifier(email)) ?? - (username && (await this.userService.findOneByIdentifier(username))); + (username ? await this.userService.findOneByIdentifier(username) : null); - if (!user) throw new Error(ErrorMessage.InvalidCredentials); + if (!user) throw new BadRequestException(ErrorMessage.InvalidCredentials); done(null, user); } catch { diff --git a/apps/server/src/auth/strategy/openid.strategy.ts b/apps/server/src/auth/strategy/openid.strategy.ts index 97cf958e0..ec9cb7a2d 100644 --- a/apps/server/src/auth/strategy/openid.strategy.ts +++ b/apps/server/src/auth/strategy/openid.strategy.ts @@ -37,7 +37,7 @@ export class OpenIDStrategy extends PassportStrategy(Strategy, "openid") { ) { const { displayName, emails, photos, username } = profile; - const email = emails?.[0].value ?? `${username}@github.com`; + const email = emails?.[0].value ?? `${username}@openid.com`; const picture = photos?.[0].value; let user: User | null = null; @@ -45,11 +45,11 @@ export class OpenIDStrategy extends PassportStrategy(Strategy, "openid") { if (!email) throw new BadRequestException(ErrorMessage.InvalidCredentials); try { - const user = + user = (await this.userService.findOneByIdentifier(email)) ?? - (username && (await this.userService.findOneByIdentifier(username))); + (username ? await this.userService.findOneByIdentifier(username) : null); - if (!user) throw new Error(ErrorMessage.InvalidCredentials); + if (!user) throw new BadRequestException(ErrorMessage.InvalidCredentials); done(null, user); } catch {