Fix recaptcha handling during login & password reset flows; closes #2064

This commit is contained in:
Dane Everitt 2020-08-01 21:08:35 -07:00
parent dd381f65a9
commit b52fc0b4d9
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 131 additions and 136 deletions

View file

@ -1,8 +1,8 @@
import http from '@/api/http';
export default (email: string): Promise<string> => {
export default (email: string, recaptchaData?: string): Promise<string> => {
return new Promise((resolve, reject) => {
http.post('/auth/password', { email })
http.post('/auth/password', { email, 'g-recaptcha-response': recaptchaData })
.then(response => resolve(response.data.status || ''))
.catch(reject);
});