When creating an "initial user", how do I set a username for the seeded user?
I'm working on a small app using NextJS and have been working on a "setup" function/endpoint to seed an initial admin user (for new deployments).
I have zero issue creating a first user with an admin role, but how do I go about setting that user's
I know that
In the docs, I don't see any functions/etc that I can pass the newly created user to in order to update the username/etc, am I missing something?
Thanks in advance!
Here's what I've got so far:
I have zero issue creating a first user with an admin role, but how do I go about setting that user's
username? (Using the username plugin).I know that
auth.api.updateUser() exists, but it seems like I can't use that because from what I gather, it updates the currently logged in user...which isn't applicable as this is a server-side thing being used to create that user in the first place.In the docs, I don't see any functions/etc that I can pass the newly created user to in order to update the username/etc, am I missing something?
Thanks in advance!
Here's what I've got so far: