Let's continue improving our WordPress security and its signup and login UX! Once your signup form is ready, you can also easily personalize your WordPress login form with Arengu. It's an even easier configuration! Discover how to do it!
Start from template... and personalize it!
Go to 'Forms' > 'Create a form' > 'Login Form' template, to save time on creating your form's interface with our drag-and-drop editor!
Add fields or a second step, change texts... and configure new verification flows and server-side logic!
Set server-side logic, without coding!
To make your login form work properly, you just need to create a flow with this structure:
Let's see it, step by step!
1. Check if user is already registered
The first step in our login flow is to include a 'HTTP request' action to check if user is already registered in our WordPress users database. To configure this action, copy the login endpoint URL from WordPress > 'Arengu Settings', and paste it on the URL field.
Also in this action, reference the needed variables on body field, paste your WordPress Private API Key with 'Authorization' header, and also check the option 'Accept any status code as successful request', to make this action work properly. Save and publish it.
2. Link your form with this flow
If you didn't use the template, and before next steps, go back to form edition and click on 'Flows' section to connect each other. Select the flow from drill down on 'Step validations flow' stage, and publish!
If you used the template, flows will be automatically connected ;)
3. Manage the HTTP request responses
After making the HTTP request to check if user is already registered and logged in, we need to manage that responses. We can handle this including an 'If/then condition' action and referencing WordPress response variable, as you can see in the picture:
4. Custom login error messages
We can show on the form personalized error messages. To manage this, include an 'Input value mapping' action, reference the input variable, default output value, and list errors and messages in the mapping table. Have a look to the plugin's documentation to easily handle this!
5. Show error messages on the form
Include a 'Show error message' action to close this branch. Just reference the output variable from 'Input value mapping' action.
6. Set session cookies!
You can include this action to keep your user's session open, but it's optional! Look for cookie variables clicking on drill down icon (+), after executing the flow once. Set here also session duration and domain, and remember to enable the checkbox!
7. Login the user!
Finally, just include a 'Submit the form' action, custom the message and destination URL, save... and publish! Your form is ready to embed!
How to embed your form in Wordpress
Just go to your form's edition > 'Share' tab and get the shortcode!
Go back to WordPress and open the post or page where you'd like to embed it. Paste the shortcode on the text editor, and update or publish!