# How to make a custom login/signup UI with Next.js? (not using universal flow)

**URL:** <https://community.auth0.com/t/how-to-make-a-custom-login-signup-ui-with-next-js-not-using-universal-flow/78093>\
**Category:** Get Help\
**Created:** [February 11, 2022, 8:41am UTC](https://community.auth0.com/t/how-to-make-a-custom-login-signup-ui-with-next-js-not-using-universal-flow/78093 "2022-02-11T08:41:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahulrentash](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rahulrentash/32/33207_2.png) [@rahulrentash](https://community.auth0.com/u/rahulrentash)\
**Post date:** [February 11, 2022, 8:41am UTC](https://community.auth0.com/t/how-to-make-a-custom-login-signup-ui-with-next-js-not-using-universal-flow/78093/1 "2022-02-11T08:41:16Z")

</div>

I want to make a custom login flow but store users and authenticate with Auth0 in my Next.js app. I’ve seen the nextjs-auth0 npm package but it seems that’s only for the Universal Login ([nextjs-auth0 doesn't work with auth0 lock · Issue #141 · auth0/nextjs-auth0 · GitHub](https://github.com/auth0/nextjs-auth0/issues/141#issuecomment-764533775))

Is this correct? If so, is there another way to achieve this? Maybe working with the authentication api directly? Thanks!

---

<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:** [February 11, 2022, 9:33am UTC](https://community.auth0.com/t/how-to-make-a-custom-login-signup-ui-with-next-js-not-using-universal-flow/78093/2 "2022-02-11T09:33:19Z")

</div>

Hey there!

Basically it doesn’t matter what stack you’re using. If you want to build the UI of your app yourself and add authentication to it you will need to use endpoints from our Authentication API:

[https://auth0.com/docs/api/authentication](https://auth0.com/docs/api/authentication)

---

<div class="post-metadata">

**Author:** ![rahulrentash](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rahulrentash/32/33207_2.png) [@rahulrentash](https://community.auth0.com/u/rahulrentash)\
**Post date:** [February 11, 2022, 6:22pm UTC](https://community.auth0.com/t/how-to-make-a-custom-login-signup-ui-with-next-js-not-using-universal-flow/78093/3 "2022-02-11T18:22:27Z")

</div>

Thanks. Is there anything I need to do beyond just calling the signup and login endpoints? I.e. for login I assume I would need to cache the access\_token or something like that? Do you know of a good tutorial for this? Thanks for your help and response!!

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [February 16, 2022, 1:58pm UTC](https://community.auth0.com/t/how-to-make-a-custom-login-signup-ui-with-next-js-not-using-universal-flow/78093/5 "2022-02-16T13:58:26Z")

</div>

Hi @rahulrentash

Actually, building your own UI/login flow is very complex and we do not recommend doing it. When you do this, you take on all the security risks in your application, instead of passing them off to Auth0.

The Universal Login Page/Auth Code or Auth Code + PKCE is the best way to go.

John

---

<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:** [February 22, 2022, 2:42pm UTC](https://community.auth0.com/t/how-to-make-a-custom-login-signup-ui-with-next-js-not-using-universal-flow/78093/6 "2022-02-22T14:42:14Z")

</div>


