Unable to login

default discord avatar
last month

I added a custom endpoint


for login on Front-end though it is working fine, I'm unable to use


for login using payload-cms. Can someone help me with this?

attached code reference as an image.

  • discord user avatar
    Payload Team
    last month

    By adding a custom endpoint that is already one that payload adds for you are effectively replacing the


    endpoint with your own.

    If you wish to have a separate process for logging in users you have two options:

    1. Use a different endpoint path so that the route isn't replacing Payload's built-in login.

    2. Make a separate


    collection that is used by your admin panel and does not override the login endpoint.

    @Sasuke14120 What do you think of those two options? I would probably do the first, seems like less work involved

  • default discord avatar
    last month

    I would also choose the 1st first.

    Thank you Dan.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!


Connect with the Payload Community on Discord



Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.