= ({children, className}: Lang
const {currentLanguage} = useTranslation();
const availableLanguageCodes: string[] = meta?.i18n?.languages ?? [];
+ const effectiveLanguageCodes: string[] = useMemo(() => {
+ const fallbackCodes: string[] = availableLanguageCodes.length > 0 ? availableLanguageCodes : [currentLanguage];
+
+ // Ensure the current language is always resolvable for display label and emoji.
+ return Array.from(new Set([currentLanguage, ...fallbackCodes]));
+ }, [availableLanguageCodes, currentLanguage]);
const languages: LanguageOption[] = useMemo(
() =>
- availableLanguageCodes.map((code: string) => ({
+ effectiveLanguageCodes.map((code: string) => ({
code,
- displayName: resolveLocaleDisplayName(code, currentLanguage),
+ // Resolve each label in its own locale so option names stay stable across UI language switches.
+ displayName: resolveLocaleDisplayName(code, code) || code,
emoji: resolveLocaleEmoji(code),
})),
- [availableLanguageCodes, currentLanguage],
+ [effectiveLanguageCodes],
);
const handleLanguageChange = (language: string): void => {
diff --git a/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx b/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx
index d3f47d09..a1c711f2 100644
--- a/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx
+++ b/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx
@@ -22,7 +22,6 @@ import {
EmbeddedFlowComponentV2 as EmbeddedFlowComponent,
EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType,
EmbeddedFlowTextVariantV2 as EmbeddedFlowTextVariant,
- EmbeddedFlowActionVariantV2 as EmbeddedFlowActionVariant,
EmbeddedFlowEventTypeV2 as EmbeddedFlowEventType,
createPackageComponentLogger,
resolveVars,
@@ -110,14 +109,16 @@ const matchesSocialProvider = (
buttonText: string,
provider: string,
authType: AuthType,
- componentVariant?: string,
+ /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
+ _componentVariant?: string,
): boolean => {
const providerId: any = `${provider}_auth`;
const providerMatches: any = actionId === providerId || eventType === providerId;
- // For social variant, also check button text for provider name
- if (componentVariant?.toUpperCase() === EmbeddedFlowActionVariant.Social) {
- return buttonText.toLowerCase().includes(provider);
+ // Social buttons usually have "Sign in with X" or "Continue with X" text,
+ // so also check button text for the provider name to increase chances of correct detection (especially for signup flows where action IDs are less standardized)
+ if (buttonText.toLowerCase().includes(provider)) {
+ return true;
}
// For signup, also check button text
@@ -142,6 +143,7 @@ const createAuthComponentFromFlow = (
authType: AuthType,
options: {
buttonClassName?: string;
+ inStack?: boolean;
inputClassName?: string;
key?: string | number;
/** Flow metadata for resolving {{meta(...)}} expressions at render time */
@@ -355,6 +357,8 @@ const createAuthComponentFromFlow = (
}
case EmbeddedFlowComponentType.Image: {
+ const explicitHeight: string = resolve(component.height?.toString());
+ const explicitWidth: string = resolve(component.width?.toString());
return (
= ({color = 'currentColor', size = 24}: ArrowRightLeftProps) => (
+
+);
+
+ArrowRightLeft.displayName = 'ArrowRightLeft';
+
+export default ArrowRightLeft;
diff --git a/packages/react/src/components/primitives/Icons/flowIconRegistry.tsx b/packages/react/src/components/primitives/Icons/flowIconRegistry.tsx
index 9dd72eee..8d85dfd0 100644
--- a/packages/react/src/components/primitives/Icons/flowIconRegistry.tsx
+++ b/packages/react/src/components/primitives/Icons/flowIconRegistry.tsx
@@ -18,6 +18,7 @@
import {FC} from 'react';
import ArrowLeftRight from './ArrowLeftRight';
+import ArrowRightLeft from './ArrowRightLeft';
export interface FlowIconProps {
color?: string;
@@ -30,6 +31,7 @@ export interface FlowIconProps {
*/
const flowIconRegistry: Record> = {
ArrowLeftRight,
+ ArrowRightLeft,
};
export default flowIconRegistry;