Skip to content
Back

Can't setup Register page with lot of details(name, age, email, dob etc)

  • 0
  • Web
henqsoft
26 Oct, 2024, 14:32

Hi guys, I have a multistep register form with more info than name, email and password as seen with most tutorial. Anytime I sned a request with all these info I get a bad request. How do I solve or appwrite register auth only allow the name, email and password values only? Please I will need help on this one is this valid?: await account.create( ID.unique(), userInfo.name, userInfo.email, userInfo.password, userInfo.linkedin, userInfo.twitter, userInfo.github, userInfo.about, userInfo.bio );

I am getting a bad request error and this is coming from my Register page and utils/ Authcontext

I will appreciate your help as we are very close to the deadline

TL;DR
Developers are having trouble setting up a Register page with extensive details beyond the basic name, email, password. The solution is to create the user with basic details first, then store additional information as separate data linked to that user, like in a collection specific to storing extra user data.
Pingu
26 Oct, 2024, 14:33

You need to store that information seperately. Create the user with what Appwrite expects for the user details, and then add the additional information as something else, linked to that user. Most likely a document in a collection specific to storing additional user data.

henqsoft
26 Oct, 2024, 14:33

Ohh okay thanks for this

henqsoft
26 Oct, 2024, 14:34

I really appreciate. It seems this is not possible

henqsoft
26 Oct, 2024, 14:34

Much love brother

Pingu
26 Oct, 2024, 14:34

You can store and retrieve the info you want to, just not in a single request whilst creating the user. Its just the workflow thats different

henqsoft
26 Oct, 2024, 14:34

Do you have any resources on how to do that

henqsoft
26 Oct, 2024, 14:35

I know if I still can create the user. Linking of the user is going to be very hard for me

henqsoft
26 Oct, 2024, 14:35

I don't have much experience

Pingu
26 Oct, 2024, 14:35

The docs are a great place to start. Look at how you create a user using your SDK, and similarly storing and retrieving documents in a collection in a database, and how that can be linked to a user

henqsoft
26 Oct, 2024, 14:37

it is that linking that is my problem. I would surely check it out. Thanks a bunch for this

Pingu
26 Oct, 2024, 14:38

Just have a column in your collection which holds the Id of the user. Then when you insert the data, it would be the user's Id, then any info you want to store on them. Then you can pull this data in whatever way makes sense later etc

henqsoft
26 Oct, 2024, 14:40

Ohhh yeah, how come I never thought of this. Thanks a lot

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more