Hey there, Newbie here with another simple newbie question!
A user should be able to add a comment in the front end like in the video (https://www.youtube.com/watch?v=xJed9iJfY9Y&t=403s). What I need is that in the user_id column of my comment table automatically display the informations “# user_id” and “name” of the user who wrote the comment.
All inputs are successfully posted in the comment table but the user_id field is empty. I can manually add “# user_id” and “name” via double klick but there is a way that this is going to happen automatically, right?
I am authenticated with the WeWebAuth Plugin and every time I submit my comment in WeWeb I look into my Logs and there I can see that my workflow is done but the user_id is 0 (which is not my # id)
I already tried to add another “user” key in my WeWeb auth Workflow which is linked with my current authenticated user, but this won’t work too. Also my id look pretty weird
So if I understand correctly, in WeWeb the field user_id is bound to WeWeb Auth - ['user'].
Is that correct?
If it is, that’s where the issue is coming from. You want to be sending the id of the user to Xano, not the entire user object.
Does that make sense?
Quick question by the way: may I ask why you are using the WeWeb Auth plugin instead of Xano Auth? Since you’re already using Xano as a data source, the integration with Xano as an authentication system would be smoother and more powerful.
Yes I want to send the id of the user to Xano and I already tried to bound “WeWeb Auth - [‘user’].id” but then I get a Error 400 with the following:
response: “{“code”:“ERROR_CODE_INPUT_ERROR”,“message”:“Value \u00223b05f68a-7ca3-4650-ad25-42f196ae3491\u0022 is not a valid integer.”,“payload”:{“param”:“user_id”}}”
I am completely new in this and just followed your examples in the WeWeb Academy and thought this would work for now. But maybe I change my authentication system to Xano if this is smoother and more powerful…
Ah yes, the academy videos are meant to be “backend-agnostic” to serve a wider audience but this can be confusing at times.
We’ll be releasing a dedicated “Build with Xano mini-course” in Q1 2024 to help new users who’ve already chosen Xano get to grips with the data source and authentication integrations more smoothly.