mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 05:12:20 +00:00
mapping
This commit is contained in:
@@ -46,12 +46,10 @@ const PROVIDER_MAPPING: {
|
||||
},
|
||||
[ProviderSlug.AZURE]: (idp: IDPInformation) => {
|
||||
const rawInfo = idp.rawInformation?.toJson() as {
|
||||
User: {
|
||||
mail: string;
|
||||
displayName?: string;
|
||||
givenName?: string;
|
||||
surname?: string;
|
||||
};
|
||||
mail: string;
|
||||
displayName?: string;
|
||||
givenName?: string;
|
||||
surname?: string;
|
||||
};
|
||||
|
||||
const idpLink: PartialMessage<IDPLink> = {
|
||||
@@ -63,14 +61,14 @@ const PROVIDER_MAPPING: {
|
||||
const req: PartialMessage<AddHumanUserRequest> = {
|
||||
username: idp.userName,
|
||||
email: {
|
||||
email: rawInfo.User?.mail,
|
||||
email: rawInfo?.mail,
|
||||
verification: { case: "isVerified", value: true },
|
||||
},
|
||||
// organisation: Organisation | undefined;
|
||||
profile: {
|
||||
displayName: rawInfo.User?.displayName ?? "",
|
||||
givenName: rawInfo.User?.givenName ?? "",
|
||||
familyName: rawInfo.User?.surname ?? "",
|
||||
displayName: rawInfo?.displayName ?? "",
|
||||
givenName: rawInfo?.givenName ?? "",
|
||||
familyName: rawInfo?.surname ?? "",
|
||||
},
|
||||
idpLinks: [idpLink],
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
getLoginSettings,
|
||||
listAuthenticationMethodTypes,
|
||||
listUsers,
|
||||
PROVIDER_NAME_MAPPING,
|
||||
startIdentityProviderFlow,
|
||||
} from "@/lib/zitadel";
|
||||
import { createSessionForUserIdAndUpdateCookie } from "@/utils/session";
|
||||
|
||||
@@ -298,6 +298,7 @@ export const PROVIDER_NAME_MAPPING: {
|
||||
} = {
|
||||
[ProviderSlug.GOOGLE]: "Google",
|
||||
[ProviderSlug.GITHUB]: "GitHub",
|
||||
[ProviderSlug.AZURE]: "Microft",
|
||||
};
|
||||
|
||||
export async function startIdentityProviderFlow({
|
||||
|
||||
Reference in New Issue
Block a user