1 | import type { CognitoUser } from 'amazon-cognito-identity-js'
|
2 | import type { inputVerificationCode_function_type } from './inputVerificationCode_function_type'
|
3 | export async function forgotPassword(user:CognitoUser, inputVerificationCode?:inputVerificationCode_function_type) {
|
4 | return new Promise((resolve, reject)=>{
|
5 | user.forgotPassword({
|
6 | onSuccess(data) {
|
7 | resolve(data)
|
8 | },
|
9 | onFailure(err) {
|
10 | reject(err.message || JSON.stringify(err))
|
11 | },
|
12 | inputVerificationCode,
|
13 | })
|
14 | })
|
15 | }
|
16 |
|
\ | No newline at end of file |