mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 13:52:20 +00:00
log
This commit is contained in:
@@ -11,6 +11,7 @@ export default async function Page({
|
||||
|
||||
const loginSettings = await getLoginSettings(server);
|
||||
|
||||
console.log("loginSettings", loginSettings);
|
||||
return (
|
||||
<div className="flex flex-col items-center space-y-4">
|
||||
<h1>Welcome back!</h1>
|
||||
|
||||
@@ -24,7 +24,8 @@ describe("/passkey/login", () => {
|
||||
sequence: 859,
|
||||
factors: {
|
||||
user: {
|
||||
loginName: "johndoe@zitadel.com",
|
||||
id: "123",
|
||||
loginName: "zitadel-admin@zitadel.localhost",
|
||||
},
|
||||
password: undefined,
|
||||
passkey: undefined,
|
||||
@@ -47,10 +48,12 @@ describe("/passkey/login", () => {
|
||||
}
|
||||
);
|
||||
|
||||
cy.visit("/loginname?loginName=johndoe%40zitadel.com&submit=true");
|
||||
cy.visit(
|
||||
"/loginname?loginName=zitadel-admin%40zitadel.localhost&submit=true"
|
||||
);
|
||||
cy.location("pathname", { timeout: 10_000 }).should(
|
||||
"eq",
|
||||
"/password?loginName=johndoe%40zitadel.com"
|
||||
"/password?loginName=zitadel-admin%40zitadel.localhost&promptPasswordless=true"
|
||||
);
|
||||
});
|
||||
it("should redirect a user with passwordless authentication to /passkey/login", () => {
|
||||
@@ -76,6 +79,7 @@ describe("/passkey/login", () => {
|
||||
sequence: 859,
|
||||
factors: {
|
||||
user: {
|
||||
id: "123",
|
||||
loginName: "johndoe@zitadel.com",
|
||||
},
|
||||
password: undefined,
|
||||
|
||||
@@ -21,12 +21,15 @@ export async function createSessionAndUpdateCookie(
|
||||
challenges
|
||||
);
|
||||
|
||||
console.log("createSession", createdSession);
|
||||
|
||||
if (createdSession) {
|
||||
return getSession(
|
||||
server,
|
||||
createdSession.sessionId,
|
||||
createdSession.sessionToken
|
||||
).then((response) => {
|
||||
console.log("getSession", response);
|
||||
if (response?.session && response.session?.factors?.user?.loginName) {
|
||||
const sessionCookie: SessionCookie = {
|
||||
id: createdSession.sessionId,
|
||||
|
||||
Reference in New Issue
Block a user