- {/* {identityProviders &&
+
+ {identityProviders &&
identityProviders.map((idp, i) => {
switch (idp.type) {
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITHUB:
@@ -77,6 +85,7 @@ export function SignInWithIDP(props: SignInWithIDPProps) {
startFlow(idp)}
>
);
case IdentityProviderType.IDENTITY_PROVIDER_TYPE_GITLAB:
@@ -96,8 +105,7 @@ export function SignInWithIDP(props: SignInWithIDPProps) {
default:
return
{idp.name}
;
}
- })} */}
- {props.children}
+ })}
);
}
diff --git a/packages/zitadel-next/package.json b/packages/zitadel-next/package.json
index 54df90caa23..4515bd92f84 100644
--- a/packages/zitadel-next/package.json
+++ b/packages/zitadel-next/package.json
@@ -32,7 +32,8 @@
"typescript": "^4.9.3",
"tailwindcss": "3.2.4",
"postcss": "8.4.21",
- "zitadel-tailwind-config": "workspace:*"
+ "zitadel-tailwind-config": "workspace:*",
+ "@zitadel/server": "workspace:*"
},
"peerDependencies": {
"@zitadel/react": "workspace:*",
diff --git a/packages/zitadel-next/src/index.tsx b/packages/zitadel-next/src/index.tsx
index ac1ee0b1a55..1754b0ee482 100644
--- a/packages/zitadel-next/src/index.tsx
+++ b/packages/zitadel-next/src/index.tsx
@@ -1,10 +1,5 @@
import "./styles.css";
-export {
- SignInWithIDP,
- type SignInWithIDPProps,
-} from "./components/SignInWithIDP";
-
export {
ZitadelNextProvider,
type ZitadelNextProps,
diff --git a/packages/zitadel-react/src/components/SignInWithGoogle.tsx b/packages/zitadel-react/src/components/SignInWithGoogle.tsx
index a318c5fc25f..0af8840e363 100644
--- a/packages/zitadel-react/src/components/SignInWithGoogle.tsx
+++ b/packages/zitadel-react/src/components/SignInWithGoogle.tsx
@@ -1,21 +1,37 @@
+"use client";
+
+import {
+ ButtonHTMLAttributes,
+ DetailedHTMLProps,
+ ReactNode,
+ forwardRef,
+} from "react";
import { SignInWithIdentityProviderProps } from "./SignInWith";
-export interface SignInWithGoogleProps
- extends SignInWithIdentityProviderProps {}
+type SignInWithGoogleProps = DetailedHTMLProps<
+ ButtonHTMLAttributes
,
+ HTMLButtonElement
+> & {
+ name?: string;
+};
-export function SignInWithGoogle(props: SignInWithGoogleProps) {
- return (
-
+export const SignInWithGoogle = forwardRef<
+ HTMLButtonElement,
+ SignInWithGoogleProps
+>(
+ ({ children, className = "", name = "", ...props }, ref): ReactNode => (
+