Shopper manual login
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
// The key "encryptedReq" should generate from the below way.
export const encryptedReq = async (toEncrypt, publicKey) => {
const buffer = Buffer.from(toEncrypt);
const encrypted = crypto.publicEncrypt(publicKey, buffer);
return encrypted.toString('base64');
};{
"ok": true,
"result": {
"access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImRiNmJkMTZhLTIyZjUtNDExYS1hN2U0LTEwY2Q3ODcxMzU1YiIsImlhdCI6MTY1NTk4MjQ4MCwiZXhwIjoxNjU1OTg0MjgwfQ.aKnfIs_KnRSASZC8C1GYJCLZsA7pbhPc8QX9ql7Xf08",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImRiNmJkMTZhLTIyZjUtNDExYS1hN2U0LTEwY2Q3ODcxMzU1YiIsImlhdCI6MTY1NTk4MjQ4MCwiZXhwIjoxNjU1OTg0MjgwfQ.aKnfIs_KnRSASZC8C1GYJCLZsA7pbhPc8QX9ql7Xf08",
"status": 1
}
}{
"ok": false,
"statusCode": 401,
"data": {},
"message": "Incorrect email and password pair"
}