chore: bump version to 2.20.2 in package.json and update captcha integration across auth components (#405)
- Incremented application version from 2.20.1 to 2.20.2 in package.json. - Added captchaSiteKey prop to SignUpPage for enhanced security. - Refactored captcha field rendering in various authentication components to ensure consistent placement and functionality.
This commit is contained in:
committed by
GitHub
parent
ac12c9355c
commit
a0e29c1193
@@ -40,6 +40,7 @@ async function SignUpPage() {
|
|||||||
providers={authConfig.providers}
|
providers={authConfig.providers}
|
||||||
displayTermsCheckbox={authConfig.displayTermsCheckbox}
|
displayTermsCheckbox={authConfig.displayTermsCheckbox}
|
||||||
paths={paths}
|
paths={paths}
|
||||||
|
captchaSiteKey={authConfig.captchaTokenSiteKey}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className={'flex justify-center'}>
|
<div className={'flex justify-center'}>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "next-supabase-saas-kit-turbo",
|
"name": "next-supabase-saas-kit-turbo",
|
||||||
"version": "2.20.1",
|
"version": "2.20.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -209,8 +209,6 @@ function OtpEmailForm({
|
|||||||
>
|
>
|
||||||
<AuthErrorAlert error={signInMutation.error} />
|
<AuthErrorAlert error={signInMutation.error} />
|
||||||
|
|
||||||
{captcha.field}
|
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
name="email"
|
name="email"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
@@ -239,6 +237,8 @@ function OtpEmailForm({
|
|||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
{captcha.field}
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,8 +79,6 @@ export function PasswordResetRequestContainer(params: {
|
|||||||
<div className={'flex flex-col gap-y-4'}>
|
<div className={'flex flex-col gap-y-4'}>
|
||||||
<AuthErrorAlert error={error} />
|
<AuthErrorAlert error={error} />
|
||||||
|
|
||||||
{captcha.field}
|
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
name={'email'}
|
name={'email'}
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
@@ -107,6 +105,7 @@ export function PasswordResetRequestContainer(params: {
|
|||||||
<Trans i18nKey={'auth:passwordResetLabel'} />
|
<Trans i18nKey={'auth:passwordResetLabel'} />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
{captcha.field}
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
</If>
|
</If>
|
||||||
|
|||||||
@@ -54,13 +54,15 @@ export function PasswordSignInContainer({
|
|||||||
<>
|
<>
|
||||||
<AuthErrorAlert error={signInMutation.error} />
|
<AuthErrorAlert error={signInMutation.error} />
|
||||||
|
|
||||||
{captcha.field}
|
<div>
|
||||||
|
<PasswordSignInForm
|
||||||
|
onSubmit={onSubmit}
|
||||||
|
loading={isLoading}
|
||||||
|
redirecting={isRedirecting}
|
||||||
|
/>
|
||||||
|
|
||||||
<PasswordSignInForm
|
{captcha.field}
|
||||||
onSubmit={onSubmit}
|
</div>
|
||||||
loading={isLoading}
|
|
||||||
redirecting={isRedirecting}
|
|
||||||
/>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,14 +51,16 @@ export function EmailPasswordSignUpContainer({
|
|||||||
<If condition={!showVerifyEmailAlert}>
|
<If condition={!showVerifyEmailAlert}>
|
||||||
<AuthErrorAlert error={error} />
|
<AuthErrorAlert error={error} />
|
||||||
|
|
||||||
{captcha.field}
|
<div>
|
||||||
|
<PasswordSignUpForm
|
||||||
|
onSubmit={onSignupRequested}
|
||||||
|
loading={loading}
|
||||||
|
defaultValues={defaultValues}
|
||||||
|
displayTermsCheckbox={displayTermsCheckbox}
|
||||||
|
/>
|
||||||
|
|
||||||
<PasswordSignUpForm
|
{captcha.field}
|
||||||
onSubmit={onSignupRequested}
|
</div>
|
||||||
loading={loading}
|
|
||||||
defaultValues={defaultValues}
|
|
||||||
displayTermsCheckbox={displayTermsCheckbox}
|
|
||||||
/>
|
|
||||||
</If>
|
</If>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ export function ResendAuthLinkForm(props: {
|
|||||||
return promise;
|
return promise;
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{captcha.field}
|
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
name={'email'}
|
name={'email'}
|
||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
@@ -89,6 +87,8 @@ export function ResendAuthLinkForm(props: {
|
|||||||
<Trans i18nKey={'auth:resendLink'} defaults={'Resend Link'} />
|
<Trans i18nKey={'auth:resendLink'} defaults={'Resend Link'} />
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
{captcha.field}
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { RocketIcon } from 'lucide-react';
|
import { RocketIcon } from 'lucide-react';
|
||||||
@@ -38,11 +38,12 @@ export function VersionUpdater(props: { intervalTimeInSecond?: number }) {
|
|||||||
const [dismissed, setDismissed] = useState(false);
|
const [dismissed, setDismissed] = useState(false);
|
||||||
const [showDialog, setShowDialog] = useState<boolean>(false);
|
const [showDialog, setShowDialog] = useState<boolean>(false);
|
||||||
|
|
||||||
if (!data?.didChange || dismissed) {
|
useEffect(() => {
|
||||||
return null;
|
if (data?.didChange && !dismissed) {
|
||||||
} else {
|
// eslint-disable-next-line
|
||||||
setShowDialog(data?.didChange ?? false);
|
setShowDialog(data?.didChange ?? false);
|
||||||
}
|
}
|
||||||
|
}, [data?.didChange, dismissed]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AlertDialog open={showDialog} onOpenChange={setShowDialog}>
|
<AlertDialog open={showDialog} onOpenChange={setShowDialog}>
|
||||||
|
|||||||
Reference in New Issue
Block a user