From 388f9a399d7e20c01dde349d6d91c32be853b946 Mon Sep 17 00:00:00 2001 From: Bradley Shellnut Date: Fri, 19 Jul 2024 11:38:20 -0700 Subject: [PATCH] Adding arctic for future OAuth. --- package.json | 3 ++- pnpm-lock.yaml | 32 +++++++++++++++++++++----------- src/env.ts | 1 - src/lib/server/auth.ts | 1 - src/lib/utils/pageCrossfade.ts | 6 +----- src/routes/(auth)/+layout.svelte | 8 +------- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 99ef560..7ee40bd 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "drizzle-kit": "^0.23.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-svelte": "^2.42.0", + "eslint-plugin-svelte": "^2.43.0", "just-clone": "^6.2.0", "just-debounce-it": "^3.2.0", "postcss": "^8.4.39", @@ -86,6 +86,7 @@ "@sveltejs/adapter-vercel": "^5.4.1", "@types/feather-icons": "^4.29.4", "@vercel/og": "^0.5.20", + "arctic": "^1.9.2", "bits-ui": "^0.21.12", "boardgamegeekclient": "^1.9.1", "class-variance-authority": "^0.7.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 891bd0e..c8d3c65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: '@vercel/og': specifier: ^0.5.20 version: 0.5.20 + arctic: + specifier: ^1.9.2 + version: 1.9.2 bits-ui: specifier: ^0.21.12 version: 0.21.12(svelte@5.0.0-next.175) @@ -178,8 +181,8 @@ importers: specifier: ^9.1.0 version: 9.1.0(eslint@8.57.0) eslint-plugin-svelte: - specifier: ^2.42.0 - version: 2.42.0(eslint@8.57.0)(svelte@5.0.0-next.175)(ts-node@10.9.2(@types/node@20.14.11)(typescript@5.5.3)) + specifier: ^2.43.0 + version: 2.43.0(eslint@8.57.0)(svelte@5.0.0-next.175)(ts-node@10.9.2(@types/node@20.14.11)(typescript@5.5.3)) just-clone: specifier: ^6.2.0 version: 6.2.0 @@ -2085,6 +2088,9 @@ packages: aproba@2.0.0: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} + arctic@1.9.2: + resolution: {integrity: sha512-VTnGpYx+ypboJdNrWnK17WeD7zN/xSCHnpecd5QYsBfVZde/5i+7DJ1wrf/ioSDMiEjagXmyNWAE3V2C9f1hNg==} + are-we-there-yet@2.0.0: resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} engines: {node: '>=10'} @@ -2592,12 +2598,12 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-plugin-svelte@2.42.0: - resolution: {integrity: sha512-mHP6z0DWq97KZvoQcApZHdF9m9epcDV/ICKufeEH18Vh+8vl7S+gwt8WdUohEqKNVMuXRkbvy1suMcVvUDiOGw==} + eslint-plugin-svelte@2.43.0: + resolution: {integrity: sha512-REkxQWvg2pp7QVLxQNa+dJ97xUqRe7Y2JJbSWkHSuszu0VcblZtXkPBPckkivk99y5CdLw4slqfPylL2d/X4jQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0-0 || ^9.0.0-0 - svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.181 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.191 peerDependenciesMeta: svelte: optional: true @@ -3920,11 +3926,11 @@ packages: peerDependencies: svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 - svelte-eslint-parser@0.40.0: - resolution: {integrity: sha512-M+v1HhC5T1WKYVxWexUCS4o6oIBS88XKzOZuhl2ew+eGxol7eC21e+VE8TC4rXJ3iT3iXT0qlZsZcpKjVo5/zQ==} + svelte-eslint-parser@0.41.0: + resolution: {integrity: sha512-L6f4hOL+AbgfBIB52Z310pg1d2QjRqm7wy3kI1W6hhdhX5bvu7+f0R6w4ykp5HoDdzq+vGhIJmsisaiJDGmVfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.181 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.191 peerDependenciesMeta: svelte: optional: true @@ -5919,6 +5925,10 @@ snapshots: aproba@2.0.0: {} + arctic@1.9.2: + dependencies: + oslo: 1.2.0 + are-we-there-yet@2.0.0: dependencies: delegates: 1.0.0 @@ -6389,7 +6399,7 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-plugin-svelte@2.42.0(eslint@8.57.0)(svelte@5.0.0-next.175)(ts-node@10.9.2(@types/node@20.14.11)(typescript@5.5.3)): + eslint-plugin-svelte@2.43.0(eslint@8.57.0)(svelte@5.0.0-next.175)(ts-node@10.9.2(@types/node@20.14.11)(typescript@5.5.3)): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@jridgewell/sourcemap-codec': 1.4.15 @@ -6402,7 +6412,7 @@ snapshots: postcss-safe-parser: 6.0.0(postcss@8.4.39) postcss-selector-parser: 6.1.0 semver: 7.6.2 - svelte-eslint-parser: 0.40.0(svelte@5.0.0-next.175) + svelte-eslint-parser: 0.41.0(svelte@5.0.0-next.175) optionalDependencies: svelte: 5.0.0-next.175 transitivePeerDependencies: @@ -7818,7 +7828,7 @@ snapshots: - stylus - sugarss - svelte-eslint-parser@0.40.0(svelte@5.0.0-next.175): + svelte-eslint-parser@0.41.0(svelte@5.0.0-next.175): dependencies: eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 diff --git a/src/env.ts b/src/env.ts index 40a31e9..469b805 100644 --- a/src/env.ts +++ b/src/env.ts @@ -16,7 +16,6 @@ const EnvSchema = z.object({ DATABASE_HOST: z.string(), DATABASE_PORT: z.coerce.number(), DATABASE_DB: z.string(), - DATABASE_URL: z.string(), PUBLIC_SITE_NAME: z.string(), PUBLIC_SITE_URL: z.string(), PUBLIC_UMAMI_DO_NOT_TRACK: z.string(), diff --git a/src/lib/server/auth.ts b/src/lib/server/auth.ts index 56b71b2..d312b89 100644 --- a/src/lib/server/auth.ts +++ b/src/lib/server/auth.ts @@ -64,6 +64,5 @@ declare module 'lucia' { firstName: string; lastName: string; theme: string; - two_factor_secret: string | null; } } diff --git a/src/lib/utils/pageCrossfade.ts b/src/lib/utils/pageCrossfade.ts index 1eabe28..9515b77 100644 --- a/src/lib/utils/pageCrossfade.ts +++ b/src/lib/utils/pageCrossfade.ts @@ -1,12 +1,8 @@ import { crossfade } from 'svelte/transition'; -import { quintOut } from 'svelte/easing'; export const [send, receive] = crossfade({ duration: d => Math.sqrt(d * 200), - easing: quintOut, - - // You can customize the fallBack if the element sizes are significantly different - fallback(node, params) { + fallback() { return { duration: 600, easing: x => --x * x * x + 1 }; // Ease-out cubic } }); \ No newline at end of file diff --git a/src/routes/(auth)/+layout.svelte b/src/routes/(auth)/+layout.svelte index 557d94d..929065e 100644 --- a/src/routes/(auth)/+layout.svelte +++ b/src/routes/(auth)/+layout.svelte @@ -48,7 +48,7 @@ -
+
{@render children()}
@@ -113,12 +113,6 @@ } } } - - .auth-form { - @media (width >= 1024px) { - padding: 2rem; - } - } } :global(.auth-buttons) {