mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 18:02:33 +00:00
/login route, extend session cookie for authRequestId
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
ZitadelServer,
|
||||
ZitadelServerOptions,
|
||||
user,
|
||||
oidc,
|
||||
settings,
|
||||
getServers,
|
||||
initializeServer,
|
||||
@@ -29,6 +30,10 @@ import {
|
||||
StartIdentityProviderFlowResponse,
|
||||
RetrieveIdentityProviderInformationRequest,
|
||||
RetrieveIdentityProviderInformationResponse,
|
||||
GetAuthRequestResponse,
|
||||
GetAuthRequestRequest,
|
||||
CreateCallbackRequest,
|
||||
CreateCallbackResponse,
|
||||
} from "@zitadel/server";
|
||||
|
||||
export const zitadelConfig: ZitadelServerOptions = {
|
||||
@@ -224,6 +229,28 @@ export async function retrieveIdentityProviderInformation(
|
||||
});
|
||||
}
|
||||
|
||||
export async function getAuthRequest(
|
||||
server: ZitadelServer,
|
||||
{ authRequestId }: GetAuthRequestRequest
|
||||
): Promise<GetAuthRequestResponse> {
|
||||
const oidcService = oidc.getOidc(server);
|
||||
|
||||
return oidcService.getAuthRequest({
|
||||
authRequestId,
|
||||
});
|
||||
}
|
||||
|
||||
export async function createCallback(
|
||||
server: ZitadelServer,
|
||||
{ authRequestId }: CreateCallbackRequest
|
||||
): Promise<CreateCallbackResponse> {
|
||||
const oidcService = oidc.getOidc(server);
|
||||
|
||||
return oidcService.createCallback({
|
||||
authRequestId,
|
||||
});
|
||||
}
|
||||
|
||||
export async function verifyEmail(
|
||||
server: ZitadelServer,
|
||||
userId: string,
|
||||
|
||||
Reference in New Issue
Block a user