mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-25 08:42:16 +00:00
# Which Problems Are Solved Invalid formatting in the login codebase due to invalid prettier configuration # How the Problems Are Solved Fxed .prettierignore wildcards for login source files # Additional Changes Removed .prettierrc file because there is already a prettier.config.mjs file # Additional Context
17 lines
567 B
TypeScript
17 lines
567 B
TypeScript
"use server";
|
|
|
|
import { authorizeOrDenyDeviceAuthorization } from "@/lib/zitadel";
|
|
import { headers } from "next/headers";
|
|
import { getServiceConfig } from "../service-url";
|
|
|
|
export async function completeDeviceAuthorization(
|
|
deviceAuthorizationId: string,
|
|
session?: { sessionId: string; sessionToken: string },
|
|
) {
|
|
const _headers = await headers();
|
|
const { serviceConfig } = getServiceConfig(_headers);
|
|
|
|
// without the session, device auth request is denied
|
|
return authorizeOrDenyDeviceAuthorization({ serviceConfig, deviceAuthorizationId, session });
|
|
}
|