diff --git a/packages/backend/src/internal.ts b/packages/backend/src/internal.ts index c9b7daf9ffc..83c552ba161 100644 --- a/packages/backend/src/internal.ts +++ b/packages/backend/src/internal.ts @@ -13,7 +13,13 @@ export type { SignedInAuthObjectOptions, SignedInAuthObject, SignedOutAuthObject export { makeAuthObjectSerializable, signedOutAuthObject, signedInAuthObject } from './tokens/authObjects'; export { AuthStatus } from './tokens/authStatus'; -export type { RequestState, SignedInState, SignedOutState } from './tokens/authStatus'; +export type { + RequestState, + SignedInState, + SignedOutState, + MachineAuthenticatedState, + MachineUnauthenticatedState, +} from './tokens/authStatus'; export { decorateObjectWithResources, stripPrivateDataFromObject } from './util/decorateObjectWithResources'; diff --git a/packages/backend/src/tokens/__tests__/request.test.ts b/packages/backend/src/tokens/__tests__/request.test.ts index 0a487390dc8..57bfe640fdb 100644 --- a/packages/backend/src/tokens/__tests__/request.test.ts +++ b/packages/backend/src/tokens/__tests__/request.test.ts @@ -756,7 +756,6 @@ describe('tokens.authenticateRequest(options)', () => { mockRequestWithHeaderAuth({ authorization: '' }), mockOptions({ entity: 'machine' }), ); - console.log(requestState); expect(requestState).toBeMachineUnAuthenticated({ reason: 'no machine token in header', diff --git a/packages/react-router/src/ssr/authenticateRequest.ts b/packages/react-router/src/ssr/authenticateRequest.ts index 27c23da94e2..37a4552d758 100644 --- a/packages/react-router/src/ssr/authenticateRequest.ts +++ b/packages/react-router/src/ssr/authenticateRequest.ts @@ -1,5 +1,11 @@ import { createClerkClient } from '@clerk/backend'; -import type { AuthenticateRequestOptions, SignedInState, SignedOutState } from '@clerk/backend/internal'; +import type { + AuthenticateRequestOptions, + MachineAuthenticatedState, + MachineUnauthenticatedState, + SignedInState, + SignedOutState, +} from '@clerk/backend/internal'; import { AuthStatus } from '@clerk/backend/internal'; import type { LoaderFunctionArgs } from './types'; @@ -8,7 +14,7 @@ import { patchRequest } from './utils'; export async function authenticateRequest( args: LoaderFunctionArgs, opts: AuthenticateRequestOptions, -): Promise { +): Promise { const { request } = args; const { audience, authorizedParties } = opts; diff --git a/packages/remix/src/ssr/authenticateRequest.ts b/packages/remix/src/ssr/authenticateRequest.ts index 27c23da94e2..37a4552d758 100644 --- a/packages/remix/src/ssr/authenticateRequest.ts +++ b/packages/remix/src/ssr/authenticateRequest.ts @@ -1,5 +1,11 @@ import { createClerkClient } from '@clerk/backend'; -import type { AuthenticateRequestOptions, SignedInState, SignedOutState } from '@clerk/backend/internal'; +import type { + AuthenticateRequestOptions, + MachineAuthenticatedState, + MachineUnauthenticatedState, + SignedInState, + SignedOutState, +} from '@clerk/backend/internal'; import { AuthStatus } from '@clerk/backend/internal'; import type { LoaderFunctionArgs } from './types'; @@ -8,7 +14,7 @@ import { patchRequest } from './utils'; export async function authenticateRequest( args: LoaderFunctionArgs, opts: AuthenticateRequestOptions, -): Promise { +): Promise { const { request } = args; const { audience, authorizedParties } = opts; diff --git a/packages/tanstack-start/src/server/authenticateRequest.ts b/packages/tanstack-start/src/server/authenticateRequest.ts index 0ffbf680686..e2490addd2b 100644 --- a/packages/tanstack-start/src/server/authenticateRequest.ts +++ b/packages/tanstack-start/src/server/authenticateRequest.ts @@ -1,5 +1,11 @@ import { createClerkClient } from '@clerk/backend'; -import type { AuthenticateRequestOptions, SignedInState, SignedOutState } from '@clerk/backend/internal'; +import type { + AuthenticateRequestOptions, + MachineAuthenticatedState, + MachineUnauthenticatedState, + SignedInState, + SignedOutState, +} from '@clerk/backend/internal'; import { AuthStatus } from '@clerk/backend/internal'; import { errorThrower } from '../utils'; @@ -8,7 +14,7 @@ import { patchRequest } from './utils'; export async function authenticateRequest( request: Request, opts: AuthenticateRequestOptions, -): Promise { +): Promise { const { audience, authorizedParties } = opts; const { apiUrl, secretKey, jwtKey, proxyUrl, isSatellite, domain, publishableKey } = opts;