diff --git a/.yarn/cache/@ory-client-npm-1.15.10-8f00cfb78c-35b5140c4f.zip b/.yarn/cache/@ory-client-npm-1.15.10-8f00cfb78c-35b5140c4f.zip new file mode 100644 index 0000000000..c099f76b54 Binary files /dev/null and b/.yarn/cache/@ory-client-npm-1.15.10-8f00cfb78c-35b5140c4f.zip differ diff --git a/.yarn/cache/@ory-client-npm-1.9.0-f36998902c-c732911c96.zip b/.yarn/cache/@ory-client-npm-1.9.0-f36998902c-c732911c96.zip deleted file mode 100644 index 4beb2a7af9..0000000000 Binary files a/.yarn/cache/@ory-client-npm-1.9.0-f36998902c-c732911c96.zip and /dev/null differ diff --git a/apps/web/package.json b/apps/web/package.json index ba0256715e..c537721c5c 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -39,7 +39,7 @@ "@fortawesome/react-fontawesome": "^0.2.0", "@hello-pangea/dnd": "^16.6.0", "@lumieducation/h5p-react": "^9.3.2", - "@ory/client": "^1.9.0", + "@ory/client": "^1.15.10", "@ory/integrations": "^1.1.5", "@radix-ui/react-dialog": "^1.1.1", "@radix-ui/react-navigation-menu": "^1.1.4", diff --git a/apps/web/src/components/pages/auth/login.tsx b/apps/web/src/components/pages/auth/login.tsx index e7bed40743..2b2701da9e 100644 --- a/apps/web/src/components/pages/auth/login.tsx +++ b/apps/web/src/components/pages/auth/login.tsx @@ -162,9 +162,16 @@ export function Login({ oauth }: { oauth?: boolean }) { unwantedPaths: [verificationUrl, logoutUrl, loginUrl, recoveryUrl], }) - const hackedValues = // @ts-expect-error try - values.method === 'nbp' // @ts-expect-error try - ? ({ ...values, provider: 'nbp' } as UpdateLoginFlowBody) + // We are currently not sure why this workaround is needed. + // values.method is supposed to be 'oidc' or 'password' + const provider = values.method as unknown as string + const hackedValues = + provider === 'nbp' || provider === 'vidis' + ? ({ + ...values, + provider, + method: 'oidc', + } as UpdateLoginFlowBody) : values try { @@ -188,7 +195,7 @@ export function Login({ oauth }: { oauth?: boolean }) { FlowType.login, setFlow, strings - )(e as AxiosError) + )(e as AxiosError) } catch (e: unknown) { const err = e as AxiosError if (err.response?.status === 400) { diff --git a/apps/web/src/components/pages/auth/registration.tsx b/apps/web/src/components/pages/auth/registration.tsx index e87e53f7d7..be4e0c048f 100644 --- a/apps/web/src/components/pages/auth/registration.tsx +++ b/apps/web/src/components/pages/auth/registration.tsx @@ -82,7 +82,20 @@ export function Registration() { }, [flowId, router, router.isReady, returnTo, flow, strings, checkInstance]) async function onSubmit(values: UpdateRegistrationFlowBody) { - const valuesWithLanguage = { ...values, 'traits.language': lang } + // We are currently not sure why this workaround is needed. + // values.method is supposed to be 'oidc' or 'password' + const provider = values.method as unknown as string + const hackedValues = + provider === 'nbp' || provider === 'vidis' + ? ({ + ...values, + provider, + method: 'oidc', + } as UpdateRegistrationFlowBody) + : values + + const valuesWithLanguage = { ...hackedValues, 'traits.language': lang } + nProgress.start() return kratos .updateRegistrationFlow({ diff --git a/yarn.lock b/yarn.lock index e0cbfa3001..3423d12796 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4174,12 +4174,12 @@ __metadata: languageName: node linkType: hard -"@ory/client@npm:^1.9.0": - version: 1.9.0 - resolution: "@ory/client@npm:1.9.0" +"@ory/client@npm:^1.15.10": + version: 1.15.10 + resolution: "@ory/client@npm:1.15.10" dependencies: axios: ^1.6.1 - checksum: c732911c967a67a96ae8acbd5f83b3e5dc38ffbc8b2d8c8f865c2659533762939ee6fe5594540aef3cd91ea5be24af708a46950f338009b3ea2ed6356aeb7a5e + checksum: 35b5140c4f6d940807a6708abb3b5a3d33fc5e02470b82757f7a01b4634eb7343678f5ce0ce62e0f04f05090629605f18445322863f488a02d8abd75cf2d9b32 languageName: node linkType: hard @@ -5864,7 +5864,7 @@ __metadata: "@hello-pangea/dnd": ^16.6.0 "@lumieducation/h5p-react": ^9.3.2 "@next/bundle-analyzer": ^13.5.6 - "@ory/client": ^1.9.0 + "@ory/client": ^1.15.10 "@ory/integrations": ^1.1.5 "@radix-ui/react-dialog": ^1.1.1 "@radix-ui/react-navigation-menu": ^1.1.4