We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a991136 commit 90e44b8Copy full SHA for 90e44b8
1 file changed
packages/auth/src/payload-jwt/authenticateRequest.ts
@@ -200,7 +200,7 @@ export async function authenticateIdentity({
200
201
const session = await verifyToken(authHeader.replace('Bearer ', ''))
202
203
- if ((!session?.sub || !session.extra) && !session?.agent_id)
+ if (!session?.sub && (!session?.extra || !session?.agent_id))
204
throw createAuthError('No valid session found', 401)
205
206
const OAUTH_CLIENT_ID = process.env.OAUTH_CLIENT_ID!
0 commit comments