# Next.js Integration with @auth0/nextjs-auth0 - v4.4.2

**URL:** <https://community.auth0.com/t/next-js-integration-with-auth0-nextjs-auth0-v4-4-2/185268>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [April 10, 2025, 2:15am UTC](https://community.auth0.com/t/next-js-integration-with-auth0-nextjs-auth0-v4-4-2/185268 "2025-04-10T02:15:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![james29](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james29/32/74173_2.png) [@james29](https://community.auth0.com/u/james29)\
**Post date:** [April 10, 2025, 2:15am UTC](https://community.auth0.com/t/next-js-integration-with-auth0-nextjs-auth0-v4-4-2/185268/1 "2025-04-10T02:15:29Z")

</div>

Running into the error below after going to auth/login.  
**500** : INTERNAL\_SERVER\_ERRORCode: `MIDDLEWARE_INVOCATION_FAILED`ID: `iad1::hj95h-1744250879675-ad92b9621be1`

Using Regular Web Application  
import Link from “next/link”;  
import { ArrowRight } from “lucide-react”;  
import { auth0 } from “@/lib/auth0”;

export default async function Home() {  
const session = await auth0.getSession();

if (!session) {  
return (  
  
  
Login to Dashboard   
  
  
);  
}  
}

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [April 30, 2025, 9:45pm UTC](https://community.auth0.com/t/next-js-integration-with-auth0-nextjs-auth0-v4-4-2/185268/3 "2025-04-30T21:45:31Z")

</div>

Hi @james29

Welcome to the Auth0 Community!

Thank you for posting the issue. Did you use our Next.js application quickstart while developing the application?-\> [https://auth0.com/docs/quickstart/webapp/nextjs/interactive](https://auth0.com/docs/quickstart/webapp/nextjs/interactive)

I’ve also noticed that you are importing the Link component. Please remember that you must use `<a>` tags instead of the `<Link>` component to ensure that the routing is not done client-side, as that may result in some unexpected behavior.

If the app is still not running after checking with quickstart, can you please open up a new issue in the Next.js-auth0 repository → [GitHub · Where software is built](https://github.com/auth0/nextjs-auth0/issues). I will ping the repo owners to check your issue.

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 14, 2025, 9:46pm UTC](https://community.auth0.com/t/next-js-integration-with-auth0-nextjs-auth0-v4-4-2/185268/4 "2025-05-14T21:46:01Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
