Skip to content

Commit

Permalink
Fix response of the resend confirmation code request
Browse files Browse the repository at this point in the history
  • Loading branch information
lammertw committed Jan 11, 2022
1 parent 13d4261 commit 6a13acd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ open class IdentityProviderClient(region: String, clientId: String) : IdentityPr

override suspend fun resendConfirmationCode(
username: String
): Result<CodeDeliveryDetails> = request(
): Result<ResendConfirmationCodeResponse> = request(
Request.ResendConfirmationCode,
ResendConfirmationCode(
ClientId = configuration.clientId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ interface IdentityProvider {
/**
* Resends the confirmation (for confirmation of registration) to a specific user in the user pool.
* @param username The username
* @return Result object containing CodeDeliveryDetails on success or an error on failure
* @return Result object containing ResendConfirmationCodeResponse on success or an error on failure
*/
suspend fun resendConfirmationCode(username: String): Result<CodeDeliveryDetails>
suspend fun resendConfirmationCode(username: String): Result<ResendConfirmationCodeResponse>

/**
* Signs in the user with the given parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ data class SignUpResponse(
val UserSub: String
)

@Serializable
data class ResendConfirmationCodeResponse(
val CodeDeliveryDetails: CodeDeliveryDetails? = null,
)

@Serializable
data class CodeDeliveryDetails(
val AttributeName: String,
Expand Down

0 comments on commit 6a13acd

Please sign in to comment.