User Actions
| Action | Description |
|---|---|
| Refresh login user data | Fetch the latest data for the signed-in user. |
| Send verification code | Send a six-digit code to a phone number or email address. The code remains valid for five minutes. |
| Sign up | Create a new user account in the app. |
| Sign in | Sign in with a username, phone number, email address, verification code, or SSO provider. |
| Sign out | Clear the current user’s local sign-in state. |
| Bind account | Link the signed-in account to a phone number, email address, or single sign-on (SSO) provider. |
| Unbind account | Unlink a phone number, email address, or SSO provider from the signed-in account. |
| Reset password | Verify identity through a verification code and reset the password. |
| Delete account | Let a user delete their account after confirming their identity with a verification code or password. |
This reference explains when to use each action, how to configure it, and what to expect when it runs.
Refresh login user data
Fetch the latest data for the signed-in user and update the local current-user data source.
Use cases
- Refresh the interface after a user updates profile information such as their username or avatar.
Parameters
None
Results
None
How it works
- Process:
- When triggered, the client starts a data query to the server (operation name
zvmAccount). - The server extracts the account ID from the request session and uses it as a filter condition to query data from the account table.
- The queried account data and the user’s permission role list are merged and returned to the frontend.
- The frontend updates the local “current user” data source with the returned data.
- When triggered, the client starts a data query to the server (operation name
- Limitations:
- The action still sends a request when the visitor is signed out. Because the session has no account ID, the server returns an empty object and the client clears the current-user data without showing an error.
Errors
- Network, server, or permission errors: If the request fails because of connectivity, gateway, rate-limit, or permission issues, Momen keeps the existing current-user data and continues with subsequent actions. It does not show an error automatically.
Examples
Refreshing user profile
-
Goal: Refresh the current-user data after a profile update so the navigation bar displays the new username.
-
Configuration:
- Prerequisites:
- Create a page named
Profileand a page namedHome. - On the
Profilepage, add an Input component namedUsername Inputand a Button component namedSave Button. - On the
Homepage, add a Text component namedUser usernameto display the current user’s username.
- Create a page named
- Select Component: On the
Profilepage canvas, select theSave Button. - Add Action: In the right panel, open the Action tab and add an action to On click.
- Configure Action:
- In the action selection dropdown, search for and select Update to save the new username to the database first.
- Click the + button next to the next action slot, search for and select Refresh login user data.
- Bind Parameters: None.
- Prerequisites:
-
Outcome: After the username is saved, Refresh login user data updates the local user state and the navigation bar displays the new value.
Send verification code
Generate a six-digit verification code and send it to a phone number or email address. The code remains valid for five minutes.
Use cases
- Verify a user’s identity during sign-up, sign-in, password reset, account binding, or account deletion.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Delivery method | Enum | Yes | Choose the delivery channel: SMS, Email, or Custom. |
| Custom config | Object | No | Appears when Delivery method is Custom. Select a configuration created under Settings → Verification code. |
| Scenario | Enum | Yes | Purpose of the code: Register, Login, Reset, Bind account, Unbind account, or Deregistration. |
| Send to | Text | Yes | Phone number or email address that receives the code. |
Results
- Result: None
- On success: Runs after Momen generates and sends the verification code.
- On failure: Runs when delivery fails because the recipient is missing or invalid, the SMS balance is insufficient, or requests are sent too frequently.
How it works
- Code generation: Momen generates a six-digit code and stores it with the recipient and selected scenario for five minutes.
- Delivery:
- With SMS or Email, Momen sends the code through its built-in delivery service.
- With Custom, Momen passes
Send to,Verification code, andScenarioto the selected Actionflow so it can deliver the code through a third-party provider.
- Limitations:
- One-minute cooldown: Requests to the same phone number or email address must be at least one minute apart. Requests made during the cooldown return a rate-limit error.
- Scenario matching: The scenario used to verify the code must match the scenario used to send it. For example, a code sent for Register cannot be used for Login, even when the digits are correct.
Custom delivery setup
To use the Custom delivery method, complete these steps:
Step 1: Create a send Actionflow
- Create an Actionflow with three inputs: recipient, verification code, and scenario.
- Add a node that delivers the code through an API or another channel.
- Bind the Actionflow inputs to the node parameters.
Step 2: Add Custom config
- Go to Settings → Verification code, and add a custom configuration.
- Enter a name, select the Actionflow created in Step 1, and map Send to, Verification code, and Scenario to its inputs under Constant in the data-binding menu.
Step 3: Use Custom config
- In Send verification code, select the configuration under Custom config. Momen will then deliver codes through the Actionflow.
Errors
- Automatic error toast: When delivery fails, Momen enters On failure and also displays an error toast, such as
Too Many Requests. Avoid adding another toast for the same error unless you want to replace the default feedback.
Examples
Send a verification code during registration
-
Goal: On the registration page, the user enters their phone number and clicks the “Send Code” button to receive a 6-digit SMS verification code.
-
Configuration:
- Prerequisites:
- Create a page named
Register. - On the
Registerpage, add an Input component namedPhone Inputand a Button component namedSend Code Button.
- Create a page named
- Select Component: On the
Registerpage canvas, select theSend Code Button. - Add Action: In the right panel, open the Action tab and add an action to On click.
- Configure Action:
- In the action selection dropdown, search for and select Send verification code.
- Set Delivery method to
SMS. - Set Scenario to
Register.
- Bind Parameters:
- Click the + button next to the Send to parameter.
- In the data source panel, select
Phone Input->Value.
- Prerequisites:
-
Outcome: The user receives a six-digit SMS code. Triggering the action again during the one-minute cooldown displays a
Too Many Requeststoast.
Sign up
Create a new user account in the app.
Enable the relevant authentication method under Settings → Sign in before adding this action. The editor only shows sign-up methods that are enabled for the project.
Use cases
- Let new users create an account with a username, email address, or phone number.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Method | Enum | Yes | Sign up method: Sign up via username, Sign up via email, or Sign up via phone. |
Configure the parameters for the selected sign-up method:
Sign up via username:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Username | Text | Yes | A unique account name containing only letters or numbers, with a maximum of 32 characters. |
| Password | Text | Yes | A password containing at least 8 characters. |
Sign up via email:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Text | Yes | User’s email address. | |
| Password | Text | Yes | Password to verify identity during sign in. |
| Verification code | Text | Yes | The verification code sent via the “Send verification code” action. |
Sign up via phone:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Phone | Text | Yes | User’s phone number. |
| Verification code | Text | Yes | The verification code sent via the “Send verification code” action. |
| Require password | Boolean | No | Whether the user must set a password. |
| Password | Text | No | Password to set when Require password is enabled. |
Results
- Result: None
- On success: Momen signs in the new user, refreshes the current-user data, and runs the actions in On success.
- On failure: Momen runs On failure when registration fails because of duplicate credentials, invalid input, or a network error.
How it works
- Prerequisite: Phone and email sign-up require a code from Send verification code.
- Process:
- The client sends the registration details to the server.
- For phone or email registration, the server validates the verification code against the cached code for the specified scenario.
- If valid, the server creates a new record in the account table and hashes the password (if provided).
- After creating the account, the server starts a session and returns the user profile to the client.
Errors
| Error Code | Error Description | Troubleshooting & Solutions |
|---|---|---|
USERNAME_CANNOT_CONTAIN_NONLETTER_OR_NONNUMBER | Username can only contain letters or numbers | Remove spaces and special characters. |
USERNAME_ALREADY_EXISTS | Username already exists | Prompt the user to change the username or guide them to sign in directly. |
PASSWORD_TOO_SHORT | Password is too short | Require at least eight characters. |
EMAIL_ADDRESS_ALREADY_EXISTS | Email already exists | Ask the user to sign in or reset their password. |
PHONE_NUMBER_ALREADY_EXISTS | Phone number already exists | Ask the user to sign in or use another phone number. |
BAD_VERIFICATION_CODE | Incorrect verification code | Check whether the entered verification code is correct or has expired. |
INVALID_PHONE_NUMBER | Invalid phone number | Check if the entered phone number format is correct. |
Examples
Register with a phone number and verification code
-
Goal: A new user enters their phone number and the received verification code, then clicks the “Register” button to create an account and automatically sign in.
-
Configuration:
- Prerequisites:
- Create a page named
Register. - On the
Registerpage, add an Input component namedPhone Input, an Input component namedCode Input, and a Button component namedRegister Button.
- Create a page named
- Select Component: On the
Registerpage canvas, select theRegister Button. - Add Action: In the right panel, open the Action tab and add an action to On click.
- Configure Action:
- In the action selection dropdown, search for and select Sign up.
- Set Method to
Sign up via phone.
- Bind Parameters:
- Click the + button next to the Phone parameter, and select
Phone Input->Value. - Click the + button next to the Verification code parameter, and select
Code Input->Value. - Set Require password to
false.
- Click the + button next to the Phone parameter, and select
- Prerequisites:
-
Outcome: When the user submits a valid phone number and verification code, Momen creates the account and signs the user in.
Sign in
Sign in with a username, phone number, email address, verification code, or SSO provider.
Enable the relevant authentication method under Settings → Sign in before adding this action. The editor only shows sign-in methods that are enabled for the project.
Use cases
- Require users to sign in before viewing personalized content.
- Authenticate users before they submit forms or publish content.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Method | Enum | Yes | Sign-in method: username, phone and password, phone and code, email, or SSO sign-in/sign-up. |
Configure the parameters for the selected sign-in method:
Sign in via username:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Username | Text | Yes | User’s account name. |
| Password | Text | Yes | User’s password. |
Sign in via phone and password:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Phone | Text | Yes | User’s phone number. |
| Password | Text | Yes | User’s password. |
Sign in via phone and code:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Phone | Text | Yes | User’s phone number. |
| Verification code | Text | Yes | Received verification code. |
Sign in via email:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Text | Yes | User’s email address. | |
| Password | Text | Yes | User’s password. |
SSO sign-in or Sign-up:
| Parameter | Type | Required | Description |
|---|---|---|---|
| SSO account | Enum | Yes | Select a configured SSO account. |
| Page type | Enum | Yes | The type of page to redirect to after successful binding. |
| Target page | Text | Yes | The target page to redirect to (appears only when Page type is “App page”). |
| URL | Text | Yes | The external URL to redirect to (appears only when Page type is “Custom URL”). |
| Page parameters | JSON | No | Key-value pairs passed to the target page. Defaults include token and projectid. |
| Actionflows on success | Object | No | Actionflow to run after successful authentication. |
Results
- Result: None
- On success: Runs after authentication succeeds.
- On failure: Runs when authentication fails, the account does not exist, or a network error occurs.
How it works
- Process:
- The client sends the user’s input account identifier and credentials to the backend.
- The system searches the database for a matching account and compares the password hash or verification code.
- After verification succeeds, the server returns a session token, which the client stores locally.
- The client updates the current-user data source and re-renders components that depend on it.
Errors
| Error Code | Meaning | Cause | Solution |
|---|---|---|---|
USERNAME_CANNOT_CONTAIN_NONLETTER_OR_NONNUMBER | Username can only contain letters or numbers | Username contains special characters | Restrict frontend input to only allow letters and numbers |
BAD_VERIFICATION_CODE | Invalid verification code | The code is incorrect or expired | Ask the user to enter the code again or request a new one |
INVALID_PHONE_NUMBER | Invalid phone number | The entered phone number does not conform to the standard format | Add phone number regex validation on the frontend |
Examples
Sign in with a username and password
-
Goal: A registered user enters their username and password on the login page and clicks the “Login” button to sign in and access their dashboard.
-
Configuration:
- Prerequisites:
- Create a page named
Loginand a page namedDashboard. - On the
Loginpage, add an Input component namedUsername Input, an Input component namedPassword Input, and a Button component namedLogin Button.
- Create a page named
- Select Component: On the
Loginpage canvas, select theLogin Button. - Add Action: In the right panel, open the Action tab and add an action to On click.
- Configure Action:
- In the action selection dropdown, search for and select Sign in.
- Set Method to
Sign in via username.
- Bind Parameters:
- Click the + button next to the Username parameter, and select
Username Input->Value. - Click the + button next to the Password parameter, and select
Password Input->Value. - In the On success branch of the action, add a Go to action and set the target page to
Dashboard.
- Click the + button next to the Username parameter, and select
- Prerequisites:
-
Outcome: When the user enters their correct username and password and clicks the “Login” button, the system authenticates their credentials, establishes a session, and redirects them to the
Dashboardpage.
Sign out
Clear the current user’s local sign-in state.
Use cases
- Add a sign-out button to an account or profile page.
- Sign out before allowing the user to switch accounts.
Parameters
None
Results
None
How it works
- Clear local credentials: Momen removes the locally stored session and current-user data.
- Update dependent UI: Components, variables, and conditions that use the current-user data source update to the guest state.
- Limitations:
- Works offline: Sign out clears local state and does not require a network request.
- Pending requests lose authentication: Requests that finish after sign out no longer have valid credentials and may return
401 Unauthorized. Do not place actions that require authentication after Sign out.
Errors
None
Examples
Sign out from an account page
-
Goal: Let a signed-in user end their session and return to the login page.
-
Configuration:
- Prerequisites:
- Create a page named
Personal Centerand a page namedLogin. - On the
Personal Centerpage, add a Button component namedSign Out Button.
- Create a page named
- Select Component: On the
Personal Centerpage canvas, select theSign Out Button. - Add Action: In the right panel, open the Action tab and add an action to On click.
- Configure Action:
- In the action selection dropdown, search for and select Sign out.
- Click the + button next to the next action slot, search for and select Go to, and set the target page to
Login.
- Bind Parameters: None.
- Prerequisites:
-
Outcome: When the user clicks the “Sign Out” button, their local session credentials are deleted, the current user state is reset to guest, and the browser immediately redirects them to the
Loginpage.
Bind account
Link the signed-in account to a phone number, email address, or single sign-on (SSO) provider.
Use cases
- Add a phone number as a sign-in method or SMS contact.
- Add an email address as a sign-in method or notification contact.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Method | Enum | Yes | Binding method: Bind phone, Bind email, or SSO bind. |
Configure the parameters for the selected binding method:
Bind phone:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Phone | Text | Yes | The phone number to bind. |
| Verification code | Text | Yes | The SMS verification code sent to that phone number. |
Bind email:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Text | Yes | The email address to bind. | |
| Verification code | Text | Yes | The verification code sent to that email. |
SSO bind:
| Parameter | Type | Required | Description |
|---|---|---|---|
| SSO configuration | Enum | Yes | Select a configured SSO account. |
| Page type | Enum | Yes | The type of page to redirect to after successful binding. |
| Target page | Text | Yes | The target page to redirect to (appears only when Page type is “App page”). |
| URL | Text | Yes | The external URL to redirect to (appears only when Page type is “Custom URL”). |
| Page parameters | JSON | No | Key-value pairs passed to the target page. Defaults include token and projectid. |
| On success actionflow | Object | No | Actionflow to run after successful binding. |
Results
- Result: Phone and email binding have no direct frontend output. SSO binding redirects the user.
- On success:
- Bind phone and Bind email: Runs after binding succeeds. Add Refresh login user data if the page must display the new credential immediately.
- SSO bind: Redirects to the configured target page and runs the selected On success actionflow.
- On failure:
- Bind phone and Bind email: Runs when binding fails, for example because the verification code is invalid or the credential belongs to another account.
- SSO bind: Does not provide a frontend failure branch.
How it works
- Bind phone: The server normalizes the number to E.164 format, verifies the SMS code, and links the number to the current account.
- Bind email: The server verifies the email code and links the address to the current account. This action does not perform strict email-format validation.
- SSO bind: Momen redirects the user to the provider’s authorization page. After authorization, the provider returns the user to the configured target page and Momen runs the selected On success actionflow.
Errors
- Unauthenticated (
HTTP 403 / ACCOUNT_NOT_AUTHENTICATED): The user is not signed in. - Invalid or expired verification code (
HTTP 400): The code cannot be verified. - Phone or email already bound: The credential is already associated with another account. The action enters On failure.
Examples
Bind a phone number to an existing account
-
Goal: A logged-in user enters their phone number and verification code on their account settings page, then clicks “Bind Phone” to link the phone number to their account.
-
Configuration:
- Prerequisites:
- Create a page named
Account Settings. - On the
Account Settingspage, add an Input component namedPhone Input, an Input component namedCode Input, and a Button component namedBind Button.
- Create a page named
- Select Component: On the
Account Settingspage canvas, select theBind Button. - Add Action: In the right panel, open the Action tab and add an action to On click.
- Configure Action:
- In the action selection dropdown, search for and select Bind account.
- Set Method to
Bind phone.
- Bind Parameters:
- Click the + button next to the Phone parameter, and select
Phone Input->Value. - Click the + button next to the Verification code parameter, and select
Code Input->Value. - In the On success branch of the action, add a Refresh login user data action to update the local user state.
- Click the + button next to the Phone parameter, and select
- Prerequisites:
-
Outcome: When the user enters their phone number and the verification code they received, then clicks the “Bind Phone” button, the phone number is linked to their account. The page data refreshes, and the interface displays the newly bound phone number.
Unbind account
Unlink a phone number, email address, or SSO provider from the signed-in account.
Use cases
- Replace the phone number or email address associated with an account.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Method | Enum | Yes | Unbind method: Unbind phone, Unbind email, or SSO unbind. |
Configure the parameters for the selected unbinding method:
Unbind phone / email:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Verification code | Text | Yes | SMS or email verification code used to verify user identity. |
SSO unbind:
| Parameter | Type | Required | Description |
|---|---|---|---|
| SSO configuration | Text | Yes | The ID of the SSO configuration item to unbind. |
Results
- Result: None
- On success: Runs after the credential is unbound.
- On failure: Runs when the verification code is invalid or the credential is the account’s only sign-in method.
How it works
- Process:
- To unbind a phone number or email address, enable the corresponding verification-code sign-in method in project settings.
- After verifying the code or SSO account, Momen checks whether the account has another sign-in method.
- Momen refuses to remove the account’s only sign-in method, preventing the user from being locked out.
- Limitations:
- Current-user data is not refreshed automatically: Add Refresh login user data to On success, or reload the page, to remove the old phone number or email address from the interface.
Errors
- Unauthenticated (
HTTP 403 / ACCOUNT_NOT_AUTHENTICATED): The user is not signed in. - Invalid or expired verification code (
HTTP 400): The code cannot be verified. - Only sign-in method (
HTTP 403 / UNBIND_ONLY_LOGIN_METHOD): The credential is the account’s only sign-in method. - SSO configuration not found (
HTTP 500 / SSO_ID_NOT_FOUND): The selected SSO configuration does not exist. - Account not found (
HTTP 404 / EntityNotExistsException): The signed-in account no longer exists.
Examples
Unbind an email address
-
Goal: A logged-in user unlinks their email address from their account by entering a verification code sent to that email and clicking “Unbind Email”.
-
Configuration:
- Prerequisites:
- Create a page named
Account Settings. - On the
Account Settingspage, add an Input component namedCode Inputand a Button component namedUnbind Button.
- Create a page named
- Select Component: On the
Account Settingspage canvas, select theUnbind Button. - Add Action: In the right panel, open the Action tab and add an action to On click.
- Configure Action:
- In the action selection dropdown, search for and select Unbind account.
- Set Method to
Unbind email.
- Bind Parameters:
- Click the + button next to the Verification code parameter, and select
Code Input->Value. - In the On success branch of the action, add a Refresh login user data action to update the local user state.
- Click the + button next to the Verification code parameter, and select
- Prerequisites:
-
Outcome: When the user enters the verification code received in their email and clicks the “Unbind Email” button, the email is unlinked from their account. The page refreshes, and the email field is cleared.
Reset password
Verify the user’s identity with a code sent to their phone number or email address, then set a new password. This action does not support changing a password by entering the old password.
Use cases
- Let a user recover a forgotten password with a code sent to a bound phone number or email address.
- Let a signed-in user verify their identity and set a new password from an account security page.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Method | Enum | Yes | Reset method: Reset password via phone or Reset password via email. |
Configure the parameters for the selected reset method:
Reset password via phone:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Target phone number | Text | Yes | The phone number bound to this account. |
| Verification code | Text | Yes | Code sent to the phone number with the Reset password scenario. |
| New password | Text | Yes | The new password set by the user. |
Reset password via email:
| Parameter | Type | Required | Description |
|---|---|---|---|
| Target email | Text | Yes | The email address bound to this account. |
| Verification code | Text | Yes | Code sent to the email address with the Reset password scenario. |
| New password | Text | Yes | The new password set by the user. |
Results
- Result: None
- On success: Runs after the password is reset. Add Go to if the user should return to the sign-in page.
- On failure: Runs when the code or input format is invalid, or when the request fails.
How it works
- Single-use verification code: Momen checks that the code matches the recipient and invalidates it after successful verification.
- Password update: Momen encrypts the new password and replaces the previous password.
- Limitations:
- Changing the password directly using the old password is not supported.
- Resetting a password for an account not bound to the relevant phone or email or an inactive account is rejected by the system.
Errors
- Invalid or expired verification code: The action returns an error and enters On failure.
- Account or credential not found: The phone number or email address is not bound to an active account.
Examples
Reset a password by phone
-
Goal: A user who forgot their password resets it on the “Forgot Password” page by entering their phone number, the verification code received, and a new password.
-
Configuration:
- Prerequisites:
- Create a page named
Forgot Passwordand a page namedLogin. - On the
Forgot Passwordpage, add an Input component namedPhone Input, an Input component namedCode Input, an Input component namedNew Password Input, and a Button component namedReset Button.
- Create a page named
- Select Component: On the
Forgot Passwordpage canvas, select theReset Button. - Add Action: In the right panel, open the Action tab and add an action to On click.
- Configure Action:
- In the action selection dropdown, search for and select Reset password.
- Set Method to
Reset password via phone.
- Bind Parameters:
- Click the + button next to the Target phone number parameter, and select
Phone Input->Value. - Click the + button next to the Verification code parameter, and select
Code Input->Value. - Click the + button next to the New password parameter, and select
New Password Input->Value. - In the On success branch of the action, add a Go to action and set the target page to
Login.
- Click the + button next to the Target phone number parameter, and select
- Prerequisites:
-
Outcome: When the user enters their phone number, verification code, and new password, and clicks the “Reset Button”, the password is updated in the database. The user is then redirected to the
Loginpage to sign in with their new password.
Delete account
Let a signed-in user delete their account after confirming their identity with a verification code or password.
Use cases
- Provide an account-deletion option in user settings to meet product and privacy requirements.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Verification code / Password | Text | Yes | Credential used to confirm the account-deletion request. |
Results
- Result: None
- On success: After verifying the code or password, Momen soft-deletes the account and signs the user out. It does not show a success message or redirect automatically, so add Show toast and Go to when needed.
- On failure: If verification or the request fails, Momen keeps the user signed in and displays an error for three seconds.
How it works
- Soft deletion: Momen removes linked third-party credentials, clears the phone number and email address, replaces the login name and password with random values, and changes the account status to
DELETED. - Business data remains: Momen updates the account and internal credential records only. It does not automatically delete data in custom tables such as orders or comments. Use triggers or an Actionflow if that data must also be removed or anonymized.
Errors
- Not signed in:
Account not authenticated. - Credential not found:
PHONE_NUMBER_NOT_FOUNDorEMAIL_NOT_FOUND. - Account already deleted:
account already deleted. - Invalid verification code:
bad verification code.
Examples
Delete an account with password confirmation
-
Goal: A logged-in user deletes their account on the “Account Settings” page by entering their password and clicking the “Delete Account” button.
-
Configuration:
- Prerequisites:
- Create a page named
Account Settingsand a page namedHome. - On the
Account Settingspage, add an Input component namedPassword Inputand a Button component namedDelete Button.
- Create a page named
- Select Component: On the
Account Settingspage canvas, select theDelete Button. - Add Action: In the right panel, open the Action tab and add an action to On click.
- Configure Action:
- In the action selection dropdown, search for and select Delete account.
- Bind Parameters:
- Click the + button next to the Verification code / Password parameter, and select
Password Input->Value. - In the On success branch of the action, add a Show toast action with the message “Account deleted successfully”, and then add a Go to action to redirect to the
Homepage.
- Click the + button next to the Verification code / Password parameter, and select
- Prerequisites:
-
Outcome: When the user enters their password and clicks the “Delete Account” button, the account is soft-deleted in the database, the local session is cleared, a success toast is displayed, and the user is redirected to the
Homepage as a guest.