This guide shows how to authenticate users in your mobile app using a password generated during a Web2Wave quiz session.
π Flow Overview
- Generate a password in a Web2Wave quiz.
- Save the password and email to Web2Wave user properties.
- Display the password to the user.
- Prompt for email + password in the mobile app.
- Validate credentials by fetching user properties from Web2Wave API.
π§© Step 1: Generate & Store Password in Quiz
const password = Math.random().toString(36).slice(-8); // e.g., "k3f9b6qz"
AnalyticsManger.setUserProperty('password', password);
Step 2: Show it to user
Use {**password**} in HTML block to show it to user.
π² Step 3: Build Mobile App Login Screen
Prompt the user to enter:
- Their email
- The password shown in the quiz
π Step 4: Fetch User Properties from Web2Wave
Use https://docs.web2wave.com/reference/get_user-properties#/ or SDK
You will receive these values:
{
"user_id": "abc123",
"properties": [
{
"property": "email",
"value": "[email protected]"
},
{
"property": "password",
"value": "k3f9b6qz"
}
]
}
Check that entered password is the same as user entered.