we need to create *DETAILED* API documentation, outlined step by step along with source code (node.js) on login and user authentication integration, with security in mind on the following both on frontend(simple and minimal) an backend on t:he following.
The solution needs to be built and using Alibaba Cloud services:
wecaht, phone, email
western union, visa, wechat pay, alipay
Please keep the frontend to minimal(we only need minimal proof of concept)
when the user signs up, if he signs up for the first time:
1. using email: he needs to provide the email, password, and password confirmation then an email will be sent to user with a randomly generated code/or link. then upon typing in the code or clicking on link, the user record will be saved to the nosql database(mongodb)
2. if user signs up using wechat, the wechat openid will be stored to mongodb (without password)
3. if user signs up with phone, a phone code will be sent to the user, upon inputing the code correctly, user phone with password will be saved to the database
1. western union, frontend input all the correct field with amount paid, backend will complete payment via rest api to western union.
2. wechat pay: frontend will allow wechat pay then payment will complete automatically
3. alipay: same as wechat pay
4. visa: same as western union.