function def

This commit is contained in:
peintnermax
2024-08-08 15:47:18 +02:00
parent 25313db4a8
commit 58cde933c8
6 changed files with 30 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
import { getBrandingSettings } from "@/lib/zitadel";
import { getBrandingSettings, sessionService } from "@/lib/zitadel";
import Alert from "@/ui/Alert";
import DynamicTheme from "@/ui/DynamicTheme";
import LoginOTP from "@/ui/LoginOTP";
@@ -17,7 +17,10 @@ export default async function Page({
const { method } = params;
const session = await loadMostRecentSession(loginName, organization);
const session = await loadMostRecentSession(sessionService, {
loginName,
organization,
});
const branding = await getBrandingSettings(organization);

View File

@@ -3,6 +3,7 @@ import {
addOTPSMS,
getBrandingSettings,
registerTOTP,
sessionService,
} from "@/lib/zitadel";
import Alert from "@/ui/Alert";
import BackButton from "@/ui/BackButton";
@@ -26,7 +27,10 @@ export default async function Page({
const { method } = params;
const branding = await getBrandingSettings(organization);
const session = await loadMostRecentSession(loginName, organization);
const session = await loadMostRecentSession(sessionService, {
loginName,
organization,
});
let totpResponse: RegisterTOTPResponse | undefined,
totpError: Error | undefined;

View File

@@ -1,4 +1,4 @@
import { getBrandingSettings, getSession } from "@/lib/zitadel";
import { getBrandingSettings, getSession, sessionService } from "@/lib/zitadel";
import Alert, { AlertType } from "@/ui/Alert";
import DynamicTheme from "@/ui/DynamicTheme";
import RegisterPasskey from "@/ui/RegisterPasskey";
@@ -13,7 +13,10 @@ export default async function Page({
const { loginName, promptPasswordless, organization, authRequestId } =
searchParams;
const sessionFactors = await loadMostRecentSession(loginName, organization);
const sessionFactors = await loadMostRecentSession(sessionService, {
loginName,
organization,
});
const title = !!promptPasswordless
? "Authenticate with a passkey"

View File

@@ -2,6 +2,7 @@ import {
getBrandingSettings,
getLoginSettings,
getSession,
sessionService,
} from "@/lib/zitadel";
import Alert from "@/ui/Alert";
import DynamicTheme from "@/ui/DynamicTheme";
@@ -17,7 +18,10 @@ export default async function Page({
const { loginName, organization, promptPasswordless, authRequestId, alt } =
searchParams;
const sessionFactors = await loadMostRecentSession(loginName, organization);
const sessionFactors = await loadMostRecentSession(sessionService, {
loginName,
organization,
});
const branding = await getBrandingSettings(organization);
const loginSettings = await getLoginSettings(organization);

View File

@@ -1,4 +1,4 @@
import { getBrandingSettings, getSession } from "@/lib/zitadel";
import { getBrandingSettings, getSession, sessionService } from "@/lib/zitadel";
import Alert, { AlertType } from "@/ui/Alert";
import DynamicTheme from "@/ui/DynamicTheme";
import RegisterPasskey from "@/ui/RegisterPasskey";
@@ -14,7 +14,10 @@ export default async function Page({
}) {
const { loginName, organization, authRequestId } = searchParams;
const sessionFactors = await loadMostRecentSession(loginName, organization);
const sessionFactors = await loadMostRecentSession(sessionService, {
loginName,
organization,
});
const title = "Use your passkey to confirm it's really you";
const description =