Improve types for signIn.create and signUp.create methods. (#8267) by @dstaley
Fixed API keys "Revoke" confirmation modal being stuck disabled when using a localization. (#8258) by @wobsoriano
Fixed API keys "Revoke" confirmation modal being stuck disabled when using a localization. (#8258) by @wobsoriano
Updated dependencies [fdac10e, 4e3cb0a, aa32bbc]:
Deprecated requireAuth() middleware. It will be removed in the next major version. (#8241) by @wobsoriano
The requireAuth() middleware redirects unauthenticated requests to a sign-in page, which is often unexpected for API routes where a 401 response is more appropriate. Use clerkMiddleware() with getAuth() instead for explicit control over authentication behavior.
Before (deprecated):
import { requireAuth } from '@clerk/express';
app.get('/api/protected', requireAuth(), (req, res) => {
// handle authenticated request
});
After (recommended):
import { clerkMiddleware, getAuth } from '@clerk/express';
app.use(clerkMiddleware());
app.get('/api/protected', (req, res) => {
const { userId } = getAuth(req);
if (!userId) {
return res.status(401).json({ error: 'Unauthorized' });
}
// handle authenticated request
});
Re-exports useAPIKeys() hook. (#8269) by @wobsoriano
Usage example:
'use client';
import { useAPIKeys } from '@clerk/nextjs';
export default function CustomAPIKeys() {
const { data, isLoading, page, pageCount, fetchNext, fetchPrevious } = useAPIKeys({
pageSize: 10,
initialPage: 1,
});
if (isLoading) return <div>Loading...</div>;
return (
<ul>
{data?.map(key => (
<li key={key.id}>{key.name}</li>
))}
</ul>
);
}
Updated dependencies [fdac10e, 4e3cb0a, aa32bbc]:
API keys is now generally available. (#8059) by @wobsoriano
<APIKeys /> componentimport { APIKeys } from '@clerk/react';
export default function Page() {
return <APIKeys />;
}
useAPIKeys() hookimport { useAPIKeys } from '@clerk/react';
export default function CustomAPIKeys() {
const { data, isLoading, page, pageCount, fetchNext, fetchPrevious } = useAPIKeys({
pageSize: 10,
initialPage: 1,
});
if (isLoading) return <div>Loading...</div>;
return (
<ul>
{data?.map(key => (
<li key={key.id}>{key.name}</li>
))}
</ul>
);
}
Adjust padding and display logo on OrganizationList header (#8229) by @LauraBeatris
Updated dependencies [2c06a5f]:
bedad42]:
API keys is now generally available. (#8059) by @wobsoriano
<APIKeys /> componentimport { APIKeys } from '@clerk/react';
export default function Page() {
return <APIKeys />;
}
useAPIKeys() hookimport { useAPIKeys } from '@clerk/react';
export default function CustomAPIKeys() {
const { data, isLoading, page, pageCount, fetchNext, fetchPrevious } = useAPIKeys({
pageSize: 10,
initialPage: 1,
});
if (isLoading) return <div>Loading...</div>;
return (
<ul>
{data?.map(key => (
<li key={key.id}>{key.name}</li>
))}
</ul>
);
}
2c06a5f]:
API keys is now generally available. (#8059) by @wobsoriano
<APIKeys /> componentimport { APIKeys } from '@clerk/react';
export default function Page() {
return <APIKeys />;
}
useAPIKeys() hookimport { useAPIKeys } from '@clerk/react';
export default function CustomAPIKeys() {
const { data, isLoading, page, pageCount, fetchNext, fetchPrevious } = useAPIKeys({
pageSize: 10,
initialPage: 1,
});
if (isLoading) return <div>Loading...</div>;
return (
<ul>
{data?.map(key => (
<li key={key.id}>{key.name}</li>
))}
</ul>
);
}
2c06a5f]: