# Next.js auth0 - API handler that gets your straight to signup?

**URL:** <https://community.auth0.com/t/next-js-auth0-api-handler-that-gets-your-straight-to-signup/62340>\
**Category:** Get Help\
**Created:** [May 6, 2021, 2:16pm UTC](https://community.auth0.com/t/next-js-auth0-api-handler-that-gets-your-straight-to-signup/62340 "2021-05-06T14:16:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alejoh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alejoh/32/29255_2.png) [@alejoh](https://community.auth0.com/u/alejoh)\
**Post date:** [May 6, 2021, 2:16pm UTC](https://community.auth0.com/t/next-js-auth0-api-handler-that-gets-your-straight-to-signup/62340/1 "2021-05-06T14:16:38Z")

</div>

- **Which SDK this is regarding:** `@auth0/nextjs-auth0`
- **SDK Version:** 1.2.0

Hey - I would like to make a link that sends the user straight to the hosted auth0 signup page.

Using the New Universal Login

This is how far I’ve gotten. Created an api handler like this:

```plaintext
import { handleLogin } from '@auth0/nextjs-auth0';
import { NextApiRequest, NextApiResponse } from 'next';

export default async function registerHandler(
  req: NextApiRequest,
  res: NextApiResponse,
) {
  handleLogin(req, res, {
    authorizationParams: {
      mode: 'signUp', // <--- ❌ does not seem to do anything
    },
  });
}

```

Is there a way to send a user straight to signup?

---

<div class="post-metadata">

**Author:** ![alejoh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alejoh/32/29255_2.png) [@alejoh](https://community.auth0.com/u/alejoh)\
**Post date:** [May 6, 2021, 2:26pm UTC](https://community.auth0.com/t/next-js-auth0-api-handler-that-gets-your-straight-to-signup/62340/2 "2021-05-06T14:26:55Z")

</div>

I solved it! Found some github comment here [Handle Signup · Issue #16 · auth0/nextjs-auth0 · GitHub](https://github.com/auth0/nextjs-auth0/issues/16#issuecomment-610650688) and tried the following

```plaintext
import { handleLogin } from '@auth0/nextjs-auth0';
import { NextApiRequest, NextApiResponse } from 'next';

export default async function registerHandler(
  req: NextApiRequest,
  res: NextApiResponse,
) {
  handleLogin(req, res, {
    authorizationParams: {
      screen_hint: 'signup',
    },
  });
}

```

Is there any problem with doing the above? Is it reliable? Seems undocumented!

---

<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:** [May 7, 2021, 8:15am UTC](https://community.auth0.com/t/next-js-auth0-api-handler-that-gets-your-straight-to-signup/62340/3 "2021-05-07T08:15:32Z")

</div>

Seems totally alright! Thanks for sharing it with the rest of community!

---

<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 22, 2021, 8:16am UTC](https://community.auth0.com/t/next-js-auth0-api-handler-that-gets-your-straight-to-signup/62340/4 "2021-05-22T08:16:29Z")

</div>

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