# Facing an issue with Next JS while login & logout

**URL:** <https://community.auth0.com/t/facing-an-issue-with-next-js-while-login-logout/73490>\
**Category:** Get Help\
**Created:** [November 20, 2021, 1:02pm UTC](https://community.auth0.com/t/facing-an-issue-with-next-js-while-login-logout/73490 "2021-11-20T13:02:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![penumatv](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/penumatv/32/12872_2.png) [@penumatv](https://community.auth0.com/u/penumatv)\
**Post date:** [November 20, 2021, 1:02pm UTC](https://community.auth0.com/t/facing-an-issue-with-next-js-while-login-logout/73490/1 "2021-11-20T13:02:03Z")

</div>

I am using Auth0 Next JS SDK in my brand new Next JS app. However, I am facing the below issue while signing in and signing out

 ![image](https://global.discourse-cdn.com/auth0/original/3X/c/b/cb2718bbffafe47a0a72134d8573b3ff5cc55bd4.png)

Any idea how to resolve this ? below is my code on the index page

```auto
import { useUser } from "@auth0/nextjs-auth0";
import Link from "next/link";

function Home() {
  const { user } = useUser();
  return (
    <div>
      {user ? (
        <p>
          Welcome {user.name}!{" "}
          <Link href="/api/auth/logout">
            <a>Logout</a>
          </Link>
        </p>
      ) : (
        <Link href="/api/auth/login">
          <a>Login</a>
        </Link>
      )}
    </div>
  );
}

export default Home;

```

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [November 22, 2021, 11:15am UTC](https://community.auth0.com/t/facing-an-issue-with-next-js-while-login-logout/73490/2 "2021-11-22T11:15:23Z")

</div>

Hey there!

The most effective way for handling this type of issues is to create a GitHub issue in the SDK repo to have that addressed directly with the SDK maintainers. Once you have a link to it you can share it ehre so we can ping them. Thank you!

> **[Issues · auth0/nextjs-auth0](https://github.com/auth0/nextjs-auth0/issues)**
>
> Next.js SDK for signing in with Auth0. Contribute to auth0/nextjs-auth0 development by creating an account on GitHub.

---

<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:** [December 7, 2021, 11:15am UTC](https://community.auth0.com/t/facing-an-issue-with-next-js-while-login-logout/73490/3 "2021-12-07T11:15:57Z")

</div>

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