Register New User and Auto Login on Success

security
howto
serverconnect

#1

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



Auto logging users in when they register
Wappler Official Documentation
Delete Database Records
How-to Guides
automatically bumped #2

automatically bumped #3

automatically bumped #4

automatically bumped #5