Skip to content

Commit 2ba44ac

Browse files
committed
Add else case AuthSignUpStep to handle new USER_AUTH step
1 parent fbab362 commit 2ba44ac

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

authenticator/src/main/java/com/amplifyframework/ui/authenticator/AuthenticatorViewModel.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,15 @@ internal class AuthenticatorViewModel(
229229
moveTo(newState)
230230
}
231231
AuthSignUpStep.DONE -> handleSignedUp(username, password)
232+
else -> {
233+
// Generic error for any other next steps that may be added in the future
234+
val exception = AuthException(
235+
"Unsupported next step ${result.nextStep.signUpStep}.",
236+
"Authenticator does not support this Authentication flow, disable it to use Authenticator."
237+
)
238+
logger.error("Unsupported next step ${result.nextStep.signUpStep}", exception)
239+
sendMessage(UnknownErrorMessage(exception))
240+
}
232241
}
233242
}
234243

0 commit comments

Comments
 (0)