isAuthenticated for auth0 is not working api side

I am trying to secure my function and I have followed the docs here: Serverless Functions (API Endpoints) | RedwoodJS Docs
But isAuthenticated doesnt return Boolean value api side.

Here my code for reference:

import type { APIGatewayEvent, Context } from "aws-lambda";

import { authDecoder } from "@redwoodjs/auth-auth0-api";
import { useRequireAuth } from "@redwoodjs/graphql-server";

import { getCurrentUser, isAuthenticated } from "src/lib/auth";
import { logger } from "src/lib/logger";

const myHandler = async (event: APIGatewayEvent, _context: Context) => {
  if (isAuthenticated) {
    return {
      statusCode: 200,
      headers: {
        "Content-Type": "application/json",
      body: JSON.stringify({
        data: "Upload Key",
        type: `${event.httpMethod}`,
        sas: "saskey",
  return {
    statusCode: 401,

export const handler = useRequireAuth({
  handlerFn: myHandler,

Am I missing something?

2 cents note: did you follow the tutorial? Accessing currentUser in the API side | RedwoodJS Docs

isAuthenticated is possibly a function in this case :slight_smile:

You probably need to call it if (isAuthenticated())

Just a guess!