Log In to Portal with Zalo¶
Guide Info
When to Use This Feature¶
Customers who rarely visit the portal may forget their passwords. Zalo login gives them another way to access the portal without remembering a separate portal password.
Example used throughout this guide: Ms. Phạm Thị Mai uses Log in with Zalo to check her invoices. After authorizing access through Zalo, she returns to the portal and checks that her existing invoices are visible. If they are missing, Portal Admin checks the Zalo link to her customer record.
With Log in with Zalo, customers authorize access through Zalo without registering themselves or remembering a separate portal password. When the configuration allows it, the system may create a user account and customer record. Access to existing documents depends on the Zalo identity being linked to the correct customer record.
This feature is a good fit when:
Your company already uses Zalo OA for customer support (customers have messaged you via Zalo OA).
Your team wants to reduce “forgot portal password” tickets.
Customers mainly use phones to check orders, invoices, and shipment tracking.
Prerequisites¶
All three conditions must be met — missing one means the button won’t appear:
Module ``viin_zalo`` is installed and OA is in Connected status — see Configure Zalo OA.
OA has both App ID and App Secret (verify in the OA record).
Module ``viin_zalo_auth_oauth`` is installed.
Configure Zalo Login for Portal¶
(Portal Admin)
Once the three prerequisites are ready, setup takes just one step:
Note
If your company operates multiple OAs, select one for portal login. Check that customers’ stored Zalo identities for that App/OA are linked to their existing customer records; matching depends on those links, not just a name or phone number.
Go to and find the OA Account field in the Zalo settings section.
Select the correct OA connected to your current company, then click Save.
After saving, the system automatically creates the internal authentication connection for the company — no additional setup needed.
Customer First-Time Login Flow¶
(Customer)
Customer opens the portal login page on a phone or computer browser.
Customer sees the “Log in with Zalo” button with the Zalo icon and clicks it.
Browser redirects to Zalo’s authentication page. If the customer is already logged into Zalo in the browser, Zalo asks to confirm access to profile information. If not, they must enter their Zalo phone number first.
Customer clicks “Agree” on Zalo’s confirmation screen.
Zalo redirects the customer back to the portal. Viindoo looks for the stored Zalo identity; it uses the existing account or creates one when the configuration permits.
Customer enters the portal without a separate portal password and checks that the orders and invoices belong to their customer record.
Note
The confirmation screen in steps 3-4 is shown by Zalo (not Viindoo). It displays the app name, a list of profile information the app requests (display name, avatar), and Agree / Decline buttons. If the customer is not logged into Zalo in the browser, Zalo first asks for their phone number and verification code before showing the confirmation screen.
Login time depends on the Zalo authorization steps and connection. After login, verify access to the expected documents.
Note
If the customer logs in but sees no old orders or invoices, see the section Customer Logs In but Doesn’t See Old Data below.
Common Issues and Solutions¶
Authentication Error When Redirecting Back from Zalo to Portal¶
Symptom: Customer clicks “Agree” on Zalo but gets an error page instead of entering the portal. Browser may display “invalid state”, “redirect mismatch”, or a blank error.
Common causes:
The redirect URL configured in Viindoo doesn’t match the URL registered in Zalo OA Console.
The OA’s App Secret was changed in Zalo but not updated in Viindoo.
Solution:
Go to and open the OA record used for portal login.
Find the OAuth Callback URL field and copy the entire URL.
Log in to Zalo OA Console → open the corresponding app → Redirect URI section → confirm the copied URL is in the list. If not, add it and save.
If the App Secret was changed: update the App Secret field in the OA record → click Save → re-authenticate the connection.
Warning
The redirect URL must match character-for-character — including http:// or https://, and whether or not it has a trailing /. A single character difference causes Zalo to reject the entire authentication flow.
Customer Logs In but Doesn’t See Old Data¶
Symptom: Customer successfully logs in via Zalo but lands in an empty account — no orders, invoices, or existing information.
Common cause: The customer’s Zalo account hasn’t been linked to their existing customer record in Viindoo — the system creates a new record instead of matching the old one.
Solution (Portal Admin):
Follow the guide at Manage Zalo Partner Links.
After linking, have the customer log out and log back in via Zalo — this time the system will recognize them correctly and open the existing account.
For new customers who haven’t messaged via Zalo OA yet, Admin should link them immediately after their first login — rather than waiting for them to report the issue.