What's Changed
🌟 Change the structure of the return data for otp confirm. Remove account and id_type key add acc_and_type_hash
- authOtpConfirm
const result = await dauth.service.authOtpConfirm({
code: emailOtp,
request_id: requestId,
mode: ESignMode.JWT,
id_type: 'mailto',
withPlainAccount: true // boolean, If true will return real email account
})
/* example return, remove account and id_type key add acc_and_type_hash
{
"mode": "proof",
"data": {
"auth": {
"acc_and_type_hash": "c5056aae3e4b528500f5e19b0e**********c916766cdb226",
"request_id": "test",
"account_plain": "scoxxxxxxx@gmail.com"
},
"signature": "578be12beb6cb5702c0c14e5b48b1599387225c96dba2cb8ce55001508******613532c5bfc2766ecd778f86d3057c81ed47a1c"
}
}
- authOauth
const result = await dauth.service.authOauth({
token: authorization_code,
request_id: "test",
id_type: "google",
mode: ESignMode.JWT
});
/* example return
{
"mode": "proof",
"data": {
"auth": {
"acc_and_type_hash": "c5056aae3e4b528500f5e19b0e**********c916766cdb226",
"request_id": "test",
},
"signature": "a5186118ad83eb466e60b37******47efd65dd387e1226052c3253aa60ac2c63fd1c"
}
}
*/