#Redirect Loop Issue in Admin Login Flow

1 messages · Page 1 of 1 (latest)

worthy mauveBOT
#

Hey! Does anyone know how I could redirect from /admin/login to /admin/create-first-user manually? I tried using

router.push('/admin/create-first-user')

in the admin beforelogin admin component in the payload.config.ts

But that causes it to jump between /admin/login and /admin/create-first-user in a loop

nimble viper
#

Hey @calm elk,

The create first user flow is specifically for creating the first admin panel user throughout the entire admin. It's not really meant to be reused as a generic view after a user has already logged in or has been created.