-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
300 changed files
with
10,964 additions
and
7,189 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@clerk/localizations": patch | ||
--- | ||
|
||
pl-PL localization updates |
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 @@ | ||
--- | ||
"@clerk/upgrade": minor | ||
--- | ||
|
||
Enhancing error handling throughout the SDK upgrade flow |
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,5 @@ | ||
--- | ||
"@clerk/express": patch | ||
--- | ||
|
||
Expose `AuthObject` type helper |
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
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,12 +1,12 @@ | ||
{ | ||
"printWidth": 120, | ||
"singleAttributePerLine": true, | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"jsxSingleQuote": true, | ||
"plugins": ["prettier-plugin-packagejson", "prettier-plugin-tailwindcss"], | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleAttributePerLine": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
"trailingComma": "all" | ||
} |
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
27 changes: 27 additions & 0 deletions
27
integration/templates/astro-node/src/layouts/ViewTransitionsLayout.astro
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,27 @@ | ||
--- | ||
import { ViewTransitions } from 'astro:transitions'; | ||
interface Props { | ||
title: string; | ||
} | ||
const { title } = Astro.props; | ||
--- | ||
|
||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="description" content="Astro description" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<meta name="generator" content={Astro.generator} /> | ||
<title>{title}</title> | ||
<ViewTransitions /> | ||
</head> | ||
<body> | ||
<main> | ||
<slot /> | ||
</main> | ||
</body> | ||
</html> |
15 changes: 15 additions & 0 deletions
15
integration/templates/astro-node/src/pages/transitions/index.astro
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,15 @@ | ||
--- | ||
import { SignedIn, SignedOut, UserButton } from "@clerk/astro/components"; | ||
import Layout from "../../layouts/ViewTransitionsLayout.astro"; | ||
--- | ||
|
||
<Layout title="Sign in"> | ||
<div class="w-full flex justify-center"> | ||
<SignedOut> | ||
<a href="/transitions/sign-in">Sign in</a> | ||
</SignedOut> | ||
<SignedIn> | ||
<UserButton /> | ||
</SignedIn> | ||
</div> | ||
</Layout> |
10 changes: 10 additions & 0 deletions
10
integration/templates/astro-node/src/pages/transitions/sign-in.astro
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,10 @@ | ||
--- | ||
import { SignIn } from "@clerk/astro/components"; | ||
import Layout from "../../layouts/ViewTransitionsLayout.astro"; | ||
--- | ||
|
||
<Layout title="Sign in"> | ||
<div class="w-full flex justify-center"> | ||
<SignIn forceRedirectUrl="/transitions" /> | ||
</div> | ||
</Layout> |
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
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/api/me/route.ts
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,6 +1,6 @@ | ||
import { auth } from '@clerk/nextjs/server'; | ||
|
||
export function GET() { | ||
const { userId } = auth(); | ||
export async function GET() { | ||
const { userId } = await auth(); | ||
return new Response(JSON.stringify({ userId })); | ||
} |
4 changes: 2 additions & 2 deletions
4
integration/templates/next-app-router/src/app/api/settings/route.ts
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,6 +1,6 @@ | ||
import { auth } from '@clerk/nextjs/server'; | ||
|
||
export function GET() { | ||
const { userId } = auth().protect(has => has({ role: 'admin' }) || has({ role: 'org:editor' })); | ||
export async function GET() { | ||
const { userId } = await auth.protect((has: any) => has({ role: 'admin' }) || has({ role: 'org:editor' })); | ||
return new Response(JSON.stringify({ userId })); | ||
} |
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
3 changes: 3 additions & 0 deletions
3
integration/templates/next-app-router/src/app/only-admin/page.tsx
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 @@ | ||
export default function Page() { | ||
return <div>User is admin</div>; | ||
} |
18 changes: 18 additions & 0 deletions
18
integration/templates/next-app-router/src/app/organizations-by-id/[id]/page.tsx
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 { auth } from '@clerk/nextjs/server'; | ||
|
||
export default async function Home({ params }: { params: { id: string } }) { | ||
const { orgId } = await auth(); | ||
|
||
if (params.id != orgId) { | ||
console.log('Mismatch - returning nothing for now...', params.id, orgId); | ||
} | ||
|
||
console.log("I'm the server and I got this id: ", orgId); | ||
|
||
return ( | ||
<> | ||
<p>Org-specific home</p> | ||
<p>From auth(), I know your org id is: {orgId}</p> | ||
</> | ||
); | ||
} |
18 changes: 18 additions & 0 deletions
18
integration/templates/next-app-router/src/app/organizations-by-id/[id]/settings/page.tsx
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 { auth } from '@clerk/nextjs/server'; | ||
|
||
export default async function Home({ params }: { params: { id: string } }) { | ||
const { orgId } = await auth(); | ||
|
||
if (params.id != orgId) { | ||
console.log('Mismatch - returning nothing for now...', params.id, orgId); | ||
} | ||
|
||
console.log("I'm the server and I got this id: ", orgId); | ||
|
||
return ( | ||
<> | ||
<p>Org-specific settings</p> | ||
<p>From auth(), I know your org id is: {orgId}</p> | ||
</> | ||
); | ||
} |
18 changes: 18 additions & 0 deletions
18
integration/templates/next-app-router/src/app/organizations-by-slug/[slug]/page.tsx
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 { auth } from '@clerk/nextjs/server'; | ||
|
||
export default async function Home({ params }: { params: { slug: string } }) { | ||
const { orgSlug } = await auth(); | ||
|
||
if (params.slug != orgSlug) { | ||
console.log('Mismatch - returning nothing for now...', params.slug, orgSlug); | ||
} | ||
|
||
console.log("I'm the server and I got this slug: ", orgSlug); | ||
|
||
return ( | ||
<> | ||
<p>Org-specific home</p> | ||
<p>From auth(), I know your org slug is: {orgSlug}</p> | ||
</> | ||
); | ||
} |
18 changes: 18 additions & 0 deletions
18
integration/templates/next-app-router/src/app/organizations-by-slug/[slug]/settings/page.tsx
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 { auth } from '@clerk/nextjs/server'; | ||
|
||
export default async function Home({ params }: { params: { slug: string } }) { | ||
const { orgSlug } = await auth(); | ||
|
||
if (params.slug != orgSlug) { | ||
console.log('Mismatch - returning nothing for now...', params.slug, orgSlug); | ||
} | ||
|
||
console.log("I'm the server and I got this slug: ", orgSlug); | ||
|
||
return ( | ||
<> | ||
<p>Org-specific settings</p> | ||
<p>From auth(), I know your org slug is: {orgSlug}</p> | ||
</> | ||
); | ||
} |
5 changes: 3 additions & 2 deletions
5
integration/templates/next-app-router/src/app/page-protected/page.tsx
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,6 +1,7 @@ | ||
import { auth } from '@clerk/nextjs/server'; | ||
|
||
export default function Page() { | ||
auth().protect(); | ||
export default async function Page() { | ||
await auth.protect(); | ||
|
||
return <div>Protected Page</div>; | ||
} |
Oops, something went wrong.