Phase 1 keeps authentication simple:
- Supabase Auth
- email OTP
- the same
profiles,properties,destinationstables
This already solves long-term storage and cross-platform sync.
For this project, WeChat login is not just a UI button. It usually requires:
- a WeChat Open Platform application
- callback domain configuration
- an auth bridge that exchanges WeChat identity for a Supabase session
Supabase can remain the source of truth for user sessions, but WeChat often needs a custom bridge layer.
- User clicks
微信登录 - Frontend opens WeChat OAuth
- WeChat redirects back with code
- Edge Function or tiny backend exchanges code for WeChat user identity
- Bridge creates or maps a Supabase user
- Frontend receives a Supabase session
- Web H5 WeChat login: medium
- WeChat mini program login: medium-high
- Supporting both H5 and mini program together: high
Do not redesign the data tables for WeChat login.
The current phase 1 schema is already compatible:
profiles.idstays mapped to Supabase auth user idproperties.user_idanddestinations.user_idremain unchanged
That means phase 2 only changes the authentication entrypoint, not the storage model.