mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 05:54:34 +00:00
prompt when loginsetting, escape prompt when alt
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
import {
|
||||
createSession,
|
||||
getSession,
|
||||
listAuthenticationMethodTypes,
|
||||
server,
|
||||
} from "#/lib/zitadel";
|
||||
import {
|
||||
SessionCookie,
|
||||
addSessionToCookie,
|
||||
getSessionCookieById,
|
||||
} from "#/utils/cookies";
|
||||
import { getSessionCookieById } from "#/utils/cookies";
|
||||
import { createSessionAndUpdateCookie } from "#/utils/session";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
|
||||
@@ -19,7 +19,14 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
const domain: string = request.nextUrl.hostname;
|
||||
|
||||
return createSessionAndUpdateCookie(loginName, password, domain, undefined);
|
||||
return createSessionAndUpdateCookie(
|
||||
loginName,
|
||||
password,
|
||||
domain,
|
||||
undefined
|
||||
).then((session) => {
|
||||
return NextResponse.json(session);
|
||||
});
|
||||
} else {
|
||||
return NextResponse.json(
|
||||
{ details: "Session could not be created" },
|
||||
|
||||
Reference in New Issue
Block a user