diff --git a/apps/web/public/locales/en/auth.json b/apps/web/public/locales/en/auth.json
index 9e80d4b40..9c35819b5 100644
--- a/apps/web/public/locales/en/auth.json
+++ b/apps/web/public/locales/en/auth.json
@@ -10,6 +10,7 @@
"signOut": "Sign out",
"signingIn": "Signing in...",
"signingUp": "Signing up...",
+ "verifyingCaptcha": "Verifying...",
"doNotHaveAccountYet": "Do not have an account yet?",
"alreadyHaveAnAccount": "Already have an account?",
"signUpToAcceptInvite": "Please sign in/up to accept the invite",
diff --git a/package.json b/package.json
index da15be97c..2ceeca43d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "next-supabase-saas-kit-turbo",
- "version": "2.21.4",
+ "version": "2.21.6",
"private": true,
"sideEffects": false,
"engines": {
diff --git a/packages/features/auth/src/captcha/client/use-captcha.tsx b/packages/features/auth/src/captcha/client/use-captcha.tsx
index c571dbe7d..7b97d6f8e 100644
--- a/packages/features/auth/src/captcha/client/use-captcha.tsx
+++ b/packages/features/auth/src/captcha/client/use-captcha.tsx
@@ -67,15 +67,20 @@ export function useCaptcha(
[siteKey, nonce, handleTokenChange, handleInstanceChange],
);
+ // Ready when captcha is not configured (no siteKey) or token is available
+ const isReady = !siteKey || token !== '';
+
return useMemo(
() => ({
/** The current captcha token */
token,
+ /** Whether the captcha is ready (not configured or token available) */
+ isReady,
/** Reset the captcha (clears token and resets widget) */
reset,
/** The captcha field component to render */
field,
}),
- [token, reset, field],
+ [token, isReady, reset, field],
);
}
diff --git a/packages/features/auth/src/components/magic-link-auth-container.tsx b/packages/features/auth/src/components/magic-link-auth-container.tsx
index c0d613588..e82bba939 100644
--- a/packages/features/auth/src/components/magic-link-auth-container.tsx
+++ b/packages/features/auth/src/components/magic-link-auth-container.tsx
@@ -49,6 +49,8 @@ export function MagicLinkAuthContainer({
const appEvents = useAppEvents();
const { recordAuthMethod } = useLastAuthMethod();
+ const captchaLoading = !captcha.isReady;
+
const form = useForm({
resolver: zodResolver(
z.object({
@@ -131,13 +133,18 @@ export function MagicLinkAuthContainer({
-