# Next App Router, link direct to sign up page?

**URL:** <https://community.auth0.com/t/next-app-router-link-direct-to-sign-up-page/117570>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, nextjs-auth0\
**Created:** [October 2, 2023, 3:44pm UTC](https://community.auth0.com/t/next-app-router-link-direct-to-sign-up-page/117570 "2023-10-02T15:44:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpinUp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/spinup/32/12714_2.png) [@SpinUp](https://community.auth0.com/u/SpinUp)\
**Post date:** [October 2, 2023, 3:44pm UTC](https://community.auth0.com/t/next-app-router-link-direct-to-sign-up-page/117570/1 "2023-10-02T15:44:05Z")

</div>

Every time I set up a new auth0, and something has changed in Next, I struggle to work out how to have a “Sign up” link. Does anyone know how to do it with the new App router?

At the moment I just have the `/api/auth/[auth0]/route.js` file with the code below. But I’m not sure how to link to like `/api/auth/register` or `/api/auth/signup`

```auto
import { handleAuth } from '@auth0/nextjs-auth0';

export const GET = handleAuth();

```

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [October 3, 2023, 10:40pm UTC](https://community.auth0.com/t/next-app-router-link-direct-to-sign-up-page/117570/2 "2023-10-03T22:40:18Z")

</div>

Hey @SpinUp welcome back!

> [@SpinUp](#):
>
> Does anyone know how to do it with the new App router?

You should be able to achieve this with the signup handler outlined here:

> <https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md#add-a-signup-handler>

---

<div class="post-metadata">

**Author:** ![SpinUp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/spinup/32/12714_2.png) [@SpinUp](https://community.auth0.com/u/SpinUp)\
**Post date:** [October 4, 2023, 9:51am UTC](https://community.auth0.com/t/next-app-router-link-direct-to-sign-up-page/117570/4 "2023-10-04T09:51:52Z")

</div>

Thanks! This worked a treat, I just had to tweak it for the Next 13.4 App Router, which requires a method function (GET in this case).

```auto
import { handleAuth, handleLogin } from "@auth0/nextjs-auth0";

export const GET = handleAuth({
  signup: handleLogin({ authorizationParams: { screen_hint: "signup" } }),
});

```

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [October 4, 2023, 9:29pm UTC](https://community.auth0.com/t/next-app-router-link-direct-to-sign-up-page/117570/5 "2023-10-04T21:29:29Z")

</div>

Awesome, thanks for confirming! Happy to help 🙂

---

<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:** [October 18, 2023, 9:29pm UTC](https://community.auth0.com/t/next-app-router-link-direct-to-sign-up-page/117570/6 "2023-10-18T21:29:54Z")

</div>

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