From 2494ed191773a997787819073878db5364da43fd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 00:13:00 +0000 Subject: [PATCH 1/3] fix(deps): update dependency next to v14.2.0-canary.48 --- web/apps/workingparty/package.json | 2 +- web/pnpm-lock.yaml | 80 +++++++++++++++--------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/web/apps/workingparty/package.json b/web/apps/workingparty/package.json index 1431baf515..ba7f3b6be9 100644 --- a/web/apps/workingparty/package.json +++ b/web/apps/workingparty/package.json @@ -40,7 +40,7 @@ "@vercel/analytics": "1.2.2", "classix": "2.1.36", "jose": "5.2.3", - "next": "14.2.0-canary.47", + "next": "14.2.0-canary.48", "next-secure-headers": "2.2.0", "next-themes": "0.3.0", "nanoid": "5.0.6", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index f687858d81..9bf77a0ebf 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -1299,7 +1299,7 @@ importers: version: 5.28.10(@tanstack/react-query@5.28.9)(react@18.2.0) '@vercel/analytics': specifier: 1.2.2 - version: 1.2.2(next@14.2.0-canary.47)(react@18.2.0) + version: 1.2.2(next@14.2.0-canary.48)(react@18.2.0) classix: specifier: 2.1.36 version: 2.1.36 @@ -1310,8 +1310,8 @@ importers: specifier: 5.0.6 version: 5.0.6 next: - specifier: 14.2.0-canary.47 - version: 14.2.0-canary.47(@babel/core@7.24.3)(@playwright/test@1.42.1)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) + specifier: 14.2.0-canary.48 + version: 14.2.0-canary.48(@babel/core@7.24.3)(@playwright/test@1.42.1)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) next-secure-headers: specifier: 2.2.0 version: 2.2.0 @@ -1390,7 +1390,7 @@ importers: version: 8.57.0 next-sitemap: specifier: 4.2.3 - version: 4.2.3(next@14.2.0-canary.47) + version: 4.2.3(next@14.2.0-canary.48) postcss: specifier: 8.4.38 version: 8.4.38 @@ -5162,8 +5162,8 @@ packages: /@next/env@14.1.4: resolution: {integrity: sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ==} - /@next/env@14.2.0-canary.47: - resolution: {integrity: sha512-AURjF/V33qm2JSik8jS6wz4R0kl4uhi1m8k1z4x8wxYi0KbO5YgFvqWRFr7hKy1wr9pJW39kwFgci2XftxDFww==} + /@next/env@14.2.0-canary.48: + resolution: {integrity: sha512-NhLe3TJ3/A0FyV/mezwpmFudLX6yzcq619bAeaL/KOQA8OkDb/zwFfbrqdibwIgRmID8pGirtzsfN6iwJzwQKA==} /@next/eslint-plugin-next@14.1.4: resolution: {integrity: sha512-n4zYNLSyCo0Ln5b7qxqQeQ34OZKXwgbdcx6kmkQbywr+0k6M3Vinft0T72R6CDAcDrne2IAgSud4uWCzFgc5HA==} @@ -5213,8 +5213,8 @@ packages: requiresBuild: true optional: true - /@next/swc-darwin-arm64@14.2.0-canary.47: - resolution: {integrity: sha512-9nemlI7DMtq1OB3r4pxuVz1nU8rMEk/e7QBO1Hc+Ss+Z98HhvlqzFIShmS6LwQKa0q6KEKOdufFwtU9WG5FXTw==} + /@next/swc-darwin-arm64@14.2.0-canary.48: + resolution: {integrity: sha512-pJX5jVTFPSymGvLk7WxKKf/TTL3/SwaeerIIr42xYK8w9hq7hTQo71ML+4l5rba4AvJ9dwlZUP5Ie/AjVXpq7w==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -5247,8 +5247,8 @@ packages: requiresBuild: true optional: true - /@next/swc-darwin-x64@14.2.0-canary.47: - resolution: {integrity: sha512-eq3ZnKg/h9Nmy7ocTOp+3v8F9id2Ar10TCBMz/JZmreeKNpNfUznIMsdNVMgqXbXoFCpLDbIMLf4qmVF3+OlQg==} + /@next/swc-darwin-x64@14.2.0-canary.48: + resolution: {integrity: sha512-o38yJhgZEZIPKMYDQevKBEtCEh6iEplJqY5MxiZ+qbjTdDVStdKZBY2O5fucVDVcP4Lb2r9lvfYIjY5G54adsQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -5281,8 +5281,8 @@ packages: requiresBuild: true optional: true - /@next/swc-linux-arm64-gnu@14.2.0-canary.47: - resolution: {integrity: sha512-CopkMncPw34uIh11KK9XtKjSjCS/R40TDRjXI+nq33y0WPfamQMKY5HgjL27qi6Yt5XbJwZhBVZx13vSC5u1Aw==} + /@next/swc-linux-arm64-gnu@14.2.0-canary.48: + resolution: {integrity: sha512-N7agPv2AFHZ2TG+bjhXtjTpLWk26wv9C1Fmj8RmYPyAmZE3SeEbgAW3Pr/+zSk8oF0EMq9rzJpYBPa1itRM0Qw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -5315,8 +5315,8 @@ packages: requiresBuild: true optional: true - /@next/swc-linux-arm64-musl@14.2.0-canary.47: - resolution: {integrity: sha512-T0Z8ECr3QerlsDAYjreyg3A6gof12dCC7sdCeTBMhLZw4JjhITfg1jrUUVWFJrASBQaYwEip001jJpyIt7NPmg==} + /@next/swc-linux-arm64-musl@14.2.0-canary.48: + resolution: {integrity: sha512-Ka4XjbGkX84Wh5jgNXxTkNv+fls2YBbIFTRq9jGGGOLFRiem6U1k4uf3L8WxbyDUmF/cXebQsCn73AHbe8gXsw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -5349,8 +5349,8 @@ packages: requiresBuild: true optional: true - /@next/swc-linux-x64-gnu@14.2.0-canary.47: - resolution: {integrity: sha512-IqaXu8km8fH3/tzluq5Arc6Yt2GaZuFF/P+uCY82MunLN+TN5FGdLpRRUbCnzlGuxTomhY4z9mRNL+3xSJP/Jg==} + /@next/swc-linux-x64-gnu@14.2.0-canary.48: + resolution: {integrity: sha512-VhYSQ2RkWFyvzn0F3qsqVrC8JsCZuzry7QlizuRrSZImOMgPKcozhRUPagtUmjC57wki4je2UtuXgt88Ac4eZg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -5383,8 +5383,8 @@ packages: requiresBuild: true optional: true - /@next/swc-linux-x64-musl@14.2.0-canary.47: - resolution: {integrity: sha512-0UluZrjveAaTmW9sNZcbhgL8Hyi1hiQzS4njau7T480M6L+dPSWx3c4W029dSBJrBVquB5mwUzjtcIQoFZPCWw==} + /@next/swc-linux-x64-musl@14.2.0-canary.48: + resolution: {integrity: sha512-+Gcza5SdYJ2nWhH6LQB/uuDhRHnDuQgzgdZ93LLV4VdrPERntl+Qkq2ZKBrL2y6jBCP7fQ9ClZkddQZw57pgeQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -5417,8 +5417,8 @@ packages: requiresBuild: true optional: true - /@next/swc-win32-arm64-msvc@14.2.0-canary.47: - resolution: {integrity: sha512-dEHvVCNlKUOMD2w8jXMIQy+/0OQHU5EHycamS5zL9cleHX2JJEyy0V0amJYJsc+26NRRSCUDC26xjCQNL27x6g==} + /@next/swc-win32-arm64-msvc@14.2.0-canary.48: + resolution: {integrity: sha512-zLbhMvmizwFmbnlYzvXDq+DwKZ8kB4uxJ12nq5+CjodIPlkCzdrHBjqq0I1D66ohd/8C53XqXdS82teeNcW7qA==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -5451,8 +5451,8 @@ packages: requiresBuild: true optional: true - /@next/swc-win32-ia32-msvc@14.2.0-canary.47: - resolution: {integrity: sha512-BJP9qLYP4n9XXOzj/mTpPRS3F4/+fduDrr5HfGp++lo898MX3wG9Mq4mrkr7WWzzlU3nuehHE9DLEwyFHtyi9w==} + /@next/swc-win32-ia32-msvc@14.2.0-canary.48: + resolution: {integrity: sha512-lFEUP1tZ9jgAucWqZd3vCexfcmuTRXUh5qWHm4MymgchTX/FO2z3drum7Bv5fc1NdLiLy5H/ENxhhVezWbfAZg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -5485,8 +5485,8 @@ packages: requiresBuild: true optional: true - /@next/swc-win32-x64-msvc@14.2.0-canary.47: - resolution: {integrity: sha512-Ee/xNaiP2S0y9emmumoqa9poi6e7oWxYZajJpbXcRIT8hURzRYgAN0+YaX86Y33M2XJ9UIX0KcUSXjCQ9zPQuA==} + /@next/swc-win32-x64-msvc@14.2.0-canary.48: + resolution: {integrity: sha512-ZfMKA0x+mnmfL0QnEtNWqE3jSZQhOqlMRc/tYWJBCTOqPxJxVW0j24enlFBzvrYwBbIi5OBdonvaXIOZaJl1yA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -9253,7 +9253,7 @@ packages: server-only: 0.0.1 dev: false - /@vercel/analytics@1.2.2(next@14.2.0-canary.47)(react@18.2.0): + /@vercel/analytics@1.2.2(next@14.2.0-canary.48)(react@18.2.0): resolution: {integrity: sha512-X0rctVWkQV1e5Y300ehVNqpOfSOufo7ieA5PIdna8yX/U7Vjz0GFsGf4qvAhxV02uQ2CVt7GYcrFfddXXK2Y4A==} peerDependencies: next: '>= 13' @@ -9264,7 +9264,7 @@ packages: react: optional: true dependencies: - next: 14.2.0-canary.47(@babel/core@7.24.3)(@playwright/test@1.42.1)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) + next: 14.2.0-canary.48(@babel/core@7.24.3)(@playwright/test@1.42.1)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) react: 18.2.0 server-only: 0.0.1 dev: false @@ -15805,7 +15805,7 @@ packages: next: 14.1.4(@babel/core@7.24.3)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) dev: true - /next-sitemap@4.2.3(next@14.2.0-canary.47): + /next-sitemap@4.2.3(next@14.2.0-canary.48): resolution: {integrity: sha512-vjdCxeDuWDzldhCnyFCQipw5bfpl4HmZA7uoo3GAaYGjGgfL4Cxb1CiztPuWGmS+auYs7/8OekRS8C2cjdAsjQ==} engines: {node: '>=14.18'} hasBin: true @@ -15816,7 +15816,7 @@ packages: '@next/env': 13.5.6 fast-glob: 3.3.2 minimist: 1.2.8 - next: 14.2.0-canary.47(@babel/core@7.24.3)(@playwright/test@1.42.1)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) + next: 14.2.0-canary.48(@babel/core@7.24.3)(@playwright/test@1.42.1)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) dev: true /next-themes@0.3.0(react-dom@18.2.0)(react@18.2.0): @@ -15992,8 +15992,8 @@ packages: - babel-plugin-macros dev: true - /next@14.2.0-canary.47(@babel/core@7.24.3)(@playwright/test@1.42.1)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0): - resolution: {integrity: sha512-gtOUWhd+diNCTeRQAMFVRFx2Fo6WKCfFWZ+yg/2TgUnF1dc+tMFU0OYjXM1NRs4Yc6jdyqzeanH3oYYSokwg1w==} + /next@14.2.0-canary.48(@babel/core@7.24.3)(@playwright/test@1.42.1)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0): + resolution: {integrity: sha512-pRuzodk1R1MZ54VELbZVyj30F2QS4CtnHPcSiMHh9GICAZ/ZLHeOyiTtcpijb8M3hRXs7Cui2xUDUR0k6zjT7Q==} engines: {node: '>=18.17.0'} hasBin: true peerDependencies: @@ -16010,7 +16010,7 @@ packages: sass: optional: true dependencies: - '@next/env': 14.2.0-canary.47 + '@next/env': 14.2.0-canary.48 '@playwright/test': 1.42.1 '@swc/helpers': 0.5.5 busboy: 1.6.0 @@ -16022,15 +16022,15 @@ packages: sass: 1.72.0 styled-jsx: 5.1.1(@babel/core@7.24.3)(react@18.2.0) optionalDependencies: - '@next/swc-darwin-arm64': 14.2.0-canary.47 - '@next/swc-darwin-x64': 14.2.0-canary.47 - '@next/swc-linux-arm64-gnu': 14.2.0-canary.47 - '@next/swc-linux-arm64-musl': 14.2.0-canary.47 - '@next/swc-linux-x64-gnu': 14.2.0-canary.47 - '@next/swc-linux-x64-musl': 14.2.0-canary.47 - '@next/swc-win32-arm64-msvc': 14.2.0-canary.47 - '@next/swc-win32-ia32-msvc': 14.2.0-canary.47 - '@next/swc-win32-x64-msvc': 14.2.0-canary.47 + '@next/swc-darwin-arm64': 14.2.0-canary.48 + '@next/swc-darwin-x64': 14.2.0-canary.48 + '@next/swc-linux-arm64-gnu': 14.2.0-canary.48 + '@next/swc-linux-arm64-musl': 14.2.0-canary.48 + '@next/swc-linux-x64-gnu': 14.2.0-canary.48 + '@next/swc-linux-x64-musl': 14.2.0-canary.48 + '@next/swc-win32-arm64-msvc': 14.2.0-canary.48 + '@next/swc-win32-ia32-msvc': 14.2.0-canary.48 + '@next/swc-win32-x64-msvc': 14.2.0-canary.48 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros From fe1142273c8183d090c41fa6ae6cba3d550b6b31 Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Fri, 29 Mar 2024 01:49:09 +0100 Subject: [PATCH 2/3] feat(workingparty): Logout process --- .../app/(rest)/(app)/app/logout/page.tsx | 32 +++++++++++++++++++ .../workingparty/app/api/auth/logout/route.ts | 6 ++++ .../components/AppSidebarProfileButton.tsx | 7 +++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 web/apps/workingparty/app/(rest)/(app)/app/logout/page.tsx create mode 100644 web/apps/workingparty/app/api/auth/logout/route.ts diff --git a/web/apps/workingparty/app/(rest)/(app)/app/logout/page.tsx b/web/apps/workingparty/app/(rest)/(app)/app/logout/page.tsx new file mode 100644 index 0000000000..b5bbcb590f --- /dev/null +++ b/web/apps/workingparty/app/(rest)/(app)/app/logout/page.tsx @@ -0,0 +1,32 @@ +'use client'; + +import { useEffect } from 'react'; +import { useRouter } from 'next/navigation'; +import { useMutation } from '@tanstack/react-query'; +import { Spinner } from '@signalco/ui-primitives/Spinner'; +import { KnownPages } from '../../../../../src/knownPages'; + +function useLogOut() { + const router = useRouter(); + + return useMutation({ + mutationFn: () => fetch('/api/auth/logout', { method: 'POST' }), + onSettled: () => { + router.push(KnownPages.Landing); + }, + }); +} + +export default function AppLogoutPage() { + const logOut = useLogOut(); + + useEffect(() => { + logOut.mutate(); + }, []); + + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/web/apps/workingparty/app/api/auth/logout/route.ts b/web/apps/workingparty/app/api/auth/logout/route.ts new file mode 100644 index 0000000000..2a7d1b620c --- /dev/null +++ b/web/apps/workingparty/app/api/auth/logout/route.ts @@ -0,0 +1,6 @@ +import { cookies } from 'next/headers'; + +export async function POST() { + cookies().delete('wp_session'); + return Response.json(null); +} diff --git a/web/apps/workingparty/src/components/AppSidebarProfileButton.tsx b/web/apps/workingparty/src/components/AppSidebarProfileButton.tsx index fd21e2cfd5..d6f35170bd 100644 --- a/web/apps/workingparty/src/components/AppSidebarProfileButton.tsx +++ b/web/apps/workingparty/src/components/AppSidebarProfileButton.tsx @@ -33,7 +33,12 @@ export function AppSidebarProfileButton() { Settings - }>Logout + } + href={KnownPages.AppLogout}> + Logout + ); From a115cba97685b2b45659987a43c613f72e3cbf91 Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Fri, 29 Mar 2024 01:49:34 +0100 Subject: [PATCH 3/3] fix(workingparty): Adjusted verify email sent wording to match actual process --- .../LoginEmailSentVerifyMessage.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/web/apps/workingparty/app/(rest)/(marketing)/login/email-sent/LoginEmailSentVerifyMessage.tsx b/web/apps/workingparty/app/(rest)/(marketing)/login/email-sent/LoginEmailSentVerifyMessage.tsx index f288132ffc..9d3b8de16b 100644 --- a/web/apps/workingparty/app/(rest)/(marketing)/login/email-sent/LoginEmailSentVerifyMessage.tsx +++ b/web/apps/workingparty/app/(rest)/(marketing)/login/email-sent/LoginEmailSentVerifyMessage.tsx @@ -1,5 +1,7 @@ 'use client'; + import { Typography } from '@signalco/ui-primitives/Typography'; +import { Stack } from '@signalco/ui-primitives/Stack'; import { useSearchParam } from '@signalco/hooks/useSearchParam'; export function LoginEmailSentVerifyMessage() { @@ -10,13 +12,18 @@ export function LoginEmailSentVerifyMessage() { <> Email Login - Keep this window open, and in new tab or another device, open the link we just sent to{' '} - {email}{' '} - with security code: - - - {verifyPhrase} + Open the link we just sent to{' '} + {email}, + {' '}verify it matches security code displayed below. + + + {verifyPhrase} + + + You can close this window after you have successfully logged in. + + ); }