mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 14:54:33 +00:00
idp components
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -17,3 +17,5 @@ packages/zitadel-server/src/app/proto
|
|||||||
packages/zitadel-client/src/app/proto
|
packages/zitadel-client/src/app/proto
|
||||||
.vscode
|
.vscode
|
||||||
.idea
|
.idea
|
||||||
|
.vercel
|
||||||
|
.env*.local
|
||||||
|
|||||||
@@ -50,19 +50,49 @@ export async function SignInWithIDP(props: SignInWithIDPProps) {
|
|||||||
identityProviders.map((idp, i) => {
|
identityProviders.map((idp, i) => {
|
||||||
switch (idp.type) {
|
switch (idp.type) {
|
||||||
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITHUB:
|
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITHUB:
|
||||||
return <SignInWithGithub key={`idp-${i}`}></SignInWithGithub>;
|
return (
|
||||||
|
<SignInWithGithub
|
||||||
|
key={`idp-${i}`}
|
||||||
|
name={idp.name}
|
||||||
|
></SignInWithGithub>
|
||||||
|
);
|
||||||
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITHUB_ES:
|
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITHUB_ES:
|
||||||
return <SignInWithGithub key={`idp-${i}`}></SignInWithGithub>;
|
return (
|
||||||
|
<SignInWithGithub
|
||||||
|
key={`idp-${i}`}
|
||||||
|
name={idp.name}
|
||||||
|
></SignInWithGithub>
|
||||||
|
);
|
||||||
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_AZURE_AD:
|
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_AZURE_AD:
|
||||||
return <SignInWithAzureAD key={`idp-${i}`}></SignInWithAzureAD>;
|
return (
|
||||||
|
<SignInWithAzureAD
|
||||||
|
key={`idp-${i}`}
|
||||||
|
name={idp.name}
|
||||||
|
></SignInWithAzureAD>
|
||||||
|
);
|
||||||
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GOOGLE:
|
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GOOGLE:
|
||||||
return <SignInWithGoogle key={`idp-${i}`}></SignInWithGoogle>;
|
return (
|
||||||
|
<SignInWithGoogle
|
||||||
|
key={`idp-${i}`}
|
||||||
|
name={idp.name}
|
||||||
|
></SignInWithGoogle>
|
||||||
|
);
|
||||||
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITLAB:
|
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITLAB:
|
||||||
return <SignInWithGitlab key={`idp-${i}`}></SignInWithGitlab>;
|
return (
|
||||||
|
<SignInWithGitlab
|
||||||
|
key={`idp-${i}`}
|
||||||
|
name={idp.name}
|
||||||
|
></SignInWithGitlab>
|
||||||
|
);
|
||||||
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED:
|
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED:
|
||||||
return <SignInWithGitlab key={`idp-${i}`}></SignInWithGitlab>;
|
return (
|
||||||
|
<SignInWithGitlab
|
||||||
|
key={`idp-${i}`}
|
||||||
|
name={idp.name}
|
||||||
|
></SignInWithGitlab>
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return <div></div>;
|
return <div>{idp.name}</div>;
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
{props.children}
|
{props.children}
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
"extends": ["//"],
|
||||||
"//"
|
|
||||||
],
|
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
"build": {
|
"build": {
|
||||||
"outputs": [
|
"outputs": ["dist/**"],
|
||||||
"dist/**"
|
"dependsOn": ["@zitadel/react#build"]
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
export interface SignInWithIdentityProviderProps {
|
export interface SignInWithIdentityProviderProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ export function SignInWithAzureAD(props: SignInWithAzureADProps) {
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<span className="ztdl-ml-4">Sign in with AzureAD</span>
|
<span className="ztdl-ml-4">
|
||||||
|
{props.name ? props.name : "Sign in with AzureAD"}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import * as React from "react";
|
|
||||||
import { SignInWithIdentityProviderProps } from "./SignInWith";
|
import { SignInWithIdentityProviderProps } from "./SignInWith";
|
||||||
|
|
||||||
export interface SignInWithGithubProps
|
export interface SignInWithGithubProps
|
||||||
@@ -33,7 +32,9 @@ export function SignInWithGithub(props: SignInWithGithubProps) {
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<span className="ztdl-ml-4">Sign in with Github</span>
|
<span className="ztdl-ml-4">
|
||||||
|
{props.name ? props.name : "Sign in with Github"}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ export function SignInWithGitlab(props: SignInWithGitlabProps) {
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<span className="ztdl-ml-4">Sign in with Gitlab</span>
|
<span className="ztdl-ml-4">
|
||||||
|
{props.name ? props.name : "Sign in with Gitlab"}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import * as React from "react";
|
|
||||||
import { SignInWithIdentityProviderProps } from "./SignInWith";
|
import { SignInWithIdentityProviderProps } from "./SignInWith";
|
||||||
|
|
||||||
export interface SignInWithGoogleProps
|
export interface SignInWithGoogleProps
|
||||||
@@ -49,7 +48,9 @@ export function SignInWithGoogle(props: SignInWithGoogleProps) {
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<span className="ztdl-ml-4">Sign in with Google</span>
|
<span className="ztdl-ml-4">
|
||||||
|
{props.name ? props.name : "Sign in with Google"}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
"extends": ["//"],
|
||||||
"//"
|
|
||||||
],
|
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
"build": {
|
"build": {
|
||||||
"outputs": [
|
"outputs": ["dist/**"]
|
||||||
"dist/**"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
3470
pnpm-lock.yaml
generated
3470
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user