mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-28 15:08:51 +00:00
feat(login): added support for otel push-based logs, metrics, and traces (#11429)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use server";
|
||||
|
||||
import { createLogger } from "@/lib/logger";
|
||||
import {
|
||||
createPasskeyRegistrationLink,
|
||||
getLoginSettings,
|
||||
@@ -27,6 +28,8 @@ import { updateOrCreateSession } from "./session";
|
||||
import { completeFlowOrGetUrl } from "../client";
|
||||
import { createSessionAndUpdateCookie } from "./cookie";
|
||||
|
||||
const logger = createLogger("passkeys");
|
||||
|
||||
type VerifyPasskeyCommand = {
|
||||
passkeyId: string;
|
||||
passkeyName?: string;
|
||||
@@ -103,7 +106,7 @@ export async function registerPasskeyLink(
|
||||
// check if a verification was done earlier
|
||||
const hasValidUserVerificationCheck = await checkUserVerification(currentUserId);
|
||||
|
||||
console.log("hasValidUserVerificationCheck", hasValidUserVerificationCheck);
|
||||
logger.info("hasValidUserVerificationCheck", { hasValidUserVerificationCheck });
|
||||
if (!hasValidUserVerificationCheck) {
|
||||
return { error: "User Verification Check has to be done" };
|
||||
}
|
||||
@@ -295,7 +298,7 @@ export async function sendPasskey(command: SendPasskeyCommand) {
|
||||
try {
|
||||
userResponse = await getUserByID({ serviceConfig, userId });
|
||||
} catch (error) {
|
||||
console.error("Error fetching user by ID:", error);
|
||||
logger.error("Error fetching user by ID:", { error });
|
||||
return { error: t("verify.errors.couldNotGetUser") };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user