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