support use 2fa backup code

This commit is contained in:
MaysWind
2020-10-22 01:30:25 +08:00
parent 669fe842cb
commit 32119f6fe1
6 changed files with 76 additions and 14 deletions
+9
View File
@@ -49,6 +49,15 @@ export default {
}
});
},
authorize2FAByBackupCode: ({ recoveryCode, token }) => {
return axios.post('2fa/recovery.json', {
recoveryCode
}, {
headers: {
Authorization: `Bearer ${token}`
}
});
},
logout: () => {
return axios.get('v1/logout.json');
},