UNPKG

337 BPlain TextView Raw
1import { _cognito_user } from './_cognito_user'
2export async function confirmRegistration(Username:string, code:string) {
3 const user = _cognito_user(Username)
4 return new Promise((resolve, reject) => {
5 user.confirmRegistration(code, true, (err, result) => {
6 if (err) {
7 reject(err)
8 return
9 }
10 resolve(result)
11 })
12 })
13}