Skip to content

Commit 7deb6f3

Browse files
committed
fix(nextjs): Import API_KEY from server Clerk utils
1 parent b1d6c60 commit 7deb6f3

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

packages/nextjs/src/server/withClerkMiddleware.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { type OptionalVerifyTokenOptions, AuthStatus } from '@clerk/backend';
2-
import { API_KEY } from '@clerk/backend-core';
32
import { NextMiddleware, NextMiddlewareResult } from 'next/dist/server/web/types';
43
import { NextFetchEvent, NextRequest, NextResponse } from 'next/server';
54

6-
import { API_URL, clerkClient, FRONTEND_API } from './clerk';
5+
import { API_KEY, API_URL, clerkClient, FRONTEND_API } from './clerk';
76
import { constants } from './constants';
87
import {
98
getCookie,
@@ -29,7 +28,6 @@ export const withClerkMiddleware: WithClerkMiddleware = (...args: unknown[]) =>
2928

3029
// get auth state, check if we need to return an interstitial
3130
const cookieToken = getCookie(req, constants.Cookies.Session);
32-
3331
const headerToken = headers.get('authorization')?.replace('Bearer ', '');
3432

3533
const requestState = await clerkClient.authenticateRequest({

0 commit comments

Comments
 (0)