-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from esbnet/feature/clerk-auth
Feature/clerk auth
- Loading branch information
Showing
19 changed files
with
654 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ yarn-error.log* | |
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { i18n } from "@/i18n"; | ||
import createMiddleware from "next-intl/middleware"; | ||
|
||
export default createMiddleware(i18n); | ||
|
||
export const config = { | ||
matcher: ["/((?!api|_next|.*\\..*).*)"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { SignUp } from "@clerk/nextjs"; | ||
|
||
export default function Page() { | ||
return <SignUp />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { SignUp } from "@clerk/nextjs"; | ||
|
||
export default function Page() { | ||
return <SignUp />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Locale } from "@/i18n"; | ||
|
||
export default function AuthLayout({ | ||
children, | ||
params, | ||
}: { | ||
children: React.ReactNode; | ||
params: { locale: Locale }; | ||
}) { | ||
return ( | ||
<div className="flex items-center justify-center h-full">{children}</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Locale } from "@/i18n"; | ||
import { UserButton } from "@clerk/nextjs"; | ||
|
||
export default function Dashboard({ params }: { params: { locale: Locale } }) { | ||
return ( | ||
<div> | ||
<p>Dashboard Page</p> | ||
<UserButton afterSignOutUrl="/" /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Button } from "@/components/ui/button"; | ||
import Link from "next/link"; | ||
|
||
export default function LandingPage() { | ||
return ( | ||
<div> | ||
Landing Page (desprotegido) | ||
<div> | ||
<Link href="/sign-in"> | ||
<Button>Login</Button> | ||
</Link> | ||
<Link href="/sign-up"> | ||
<Button>Register</Button> | ||
</Link> | ||
</div> | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { handleAuth } from "@kinde-oss/kinde-auth-nextjs/server"; | ||
|
||
export const GET = handleAuth(); |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { i18n } from "@/i18n"; | ||
import createMiddleware from "next-intl/middleware"; | ||
import { authMiddleware } from "@clerk/nextjs"; | ||
|
||
export default createMiddleware(i18n); | ||
export default authMiddleware({ | ||
publicRoutes: ["/", "/api/webhook"], | ||
}); | ||
|
||
export const config = { | ||
matcher: ["/((?!api|_next|.*\\..*).*)"], | ||
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import createNextIntlPlugin from "next-intl/plugin"; | ||
// import createNextIntlPlugin from "next-intl/plugin"; | ||
|
||
const withNextIntl = createNextIntlPlugin(); | ||
// const withNextIntl = createNextIntlPlugin(); | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
|
||
export default withNextIntl(nextConfig); | ||
// export default withNextIntl(nextConfig); | ||
export default nextConfig; |
Oops, something went wrong.