Register New User and Auto Login on Success

This was implemented in DW version but the same goes for Wappler.

  1. We insert user in the database (when he subscribes).
  2. We get current user’s data.
  3. We create a repeat using the query created in step 2 as an expression.
  4. We add the security provider.
  5. Using the ‘security login’ as values to validate those coming from the repeat.
  6. If the data is valid, you can whatever you want (create query, redirect etc).

Step 2
In the filter just use the identity of the ‘insert in step 1’ to get the username and password.

Step 3
In the repeat just use as an expression query created in ‘step 2’ and output ‘username’ and ‘password’ so you can use them inside the repeat.

Step 4
In the ‘security login’ just use the ‘username’ and ‘password’ coming from the repeat.
If user is valid (which will be since Server action has executed successfully and has reached this step) he will be logged in.
After logging in just do whatever you want. Add another query, or just redirect him using the ‘onsuccess’ dynamic event.


WapplerPrevious


5 Likes

For anyone trying to achieve this, have a look at this method and let me know what you think:

Does anyone knows where can find create a user registration with Wappler UI. sorry, it’s very confusing to follow steps using different UI.

This topic is 3 years old.
You can check our youtube channel for tutorials like this

1 Like

Thank you for the video information.
Just a suggestion, better if you delete this info from docs, and replace it with a video that you just share.

However, I personally prefer reading written documentation rather than watching video tutorials.