login with idp

This commit is contained in:
peintnermax
2024-03-15 17:21:21 +01:00
parent 952a1c85be
commit 7cd59d8c6b
8 changed files with 159 additions and 17 deletions

View File

@@ -125,6 +125,23 @@ export async function createSession(
);
}
export async function createSessionForUserIdAndIdpIntent(
server: ZitadelServer,
userId: string,
idpIntent: {
idpIntentId?: string | undefined;
idpIntentToken?: string | undefined;
}
): Promise<CreateSessionResponse | undefined> {
const sessionService = session.getSession(server);
return sessionService.createSession(
{
checks: { user: { userId }, idpIntent },
},
{}
);
}
export async function setSession(
server: ZitadelServer,
sessionId: string,