update Clerk V5

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-04-24 18:26:53 +02:00
parent 288fd6f6d0
commit e2d56fb34f
15 changed files with 360 additions and 330 deletions

View File

@@ -1,7 +1,7 @@
'use client';
import type { OAuthStrategy } from '@/types';
import { useSignIn } from '@clerk/nextjs';
import type { OAuthStrategy } from '@clerk/nextjs/dist/types/server';
import { toast } from 'sonner';
import EmailSignUp from './email-sign-in';

View File

@@ -1,4 +1,4 @@
import { auth } from '@clerk/nextjs';
import { auth } from '@clerk/nextjs/server';
import { redirect } from 'next/navigation';
import PageClient from './page.client';

View File

@@ -1,7 +1,7 @@
'use client';
import type { OAuthStrategy } from '@/types';
import { useSignUp } from '@clerk/nextjs';
import type { OAuthStrategy } from '@clerk/nextjs/dist/types/server';
import { toast } from 'sonner';
import EmailSignUp from './email-sign-up';

View File

@@ -1,4 +1,4 @@
import { auth } from '@clerk/nextjs';
import { auth } from '@clerk/nextjs/server';
import { redirect } from 'next/navigation';
import PageClient from './page.client';

View File

@@ -3,7 +3,12 @@ import { AuthenticateWithRedirectCallback } from '@clerk/nextjs';
export const dynamic = 'force-dynamic';
const SSOCallback = () => {
return <AuthenticateWithRedirectCallback />;
return (
<AuthenticateWithRedirectCallback
signInUrl="/login"
signUpUrl="/register"
/>
);
};
export default SSOCallback;