Skip to content

Commit

Permalink
#219 VerifyEmail 완성
Browse files Browse the repository at this point in the history
  • Loading branch information
pknujsp committed Mar 11, 2024
1 parent da0254c commit 63c088e
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
package com.android.mediproject.core.network.datasource.sign

import com.amazonaws.mobileconnectors.cognitoidentityprovider.CognitoUserPool
import com.amazonaws.mobileconnectors.cognitoidentityprovider.handlers.GenericHandler
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine

class VerifyEmailImpl(userPool: CognitoUserPool) : AWSAccountManager(userPool), VerifyEmailAWS {
override suspend fun verifyEmail(email: String, code: String): Boolean {
TODO("Not yet implemented")
override suspend fun verifyEmail(email: String, code: String) = suspendCoroutine {
userPool.getUser(email).confirmSignUp(
code, true,
object : GenericHandler {
override fun onSuccess() {
it.resume(true)
}

override fun onFailure(exception: Exception) {
it.resume(false)
}
},
)
}
}

Expand Down

0 comments on commit 63c088e

Please sign in to comment.