Skip to content

Commit 8fe1b35

Browse files
auth: change Add Connection page Identity Center submit behavior (#3858)
Problem: When there is an error under the submit button of the Identity Center form for the Add Connection page, the 'sign in' button looks like it is stuck because we expect the user to update the Identity Center form (eg: change the start url) and then allow them to click 'sign in'. The issue is in certain cases where they have an error but want to retry (eg: cancelled during the sing in process) they are unable to do this. Solution: If an error is detected under the 'sign in' button, which is caused by a previous failed attempt, we will still allow the user to click 'sign in' again. Signed-off-by: nkomonen <[email protected]>
1 parent e1a2c4f commit 8fe1b35

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/auth/ui/vue/authForms/manageIdentityCenter.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,14 @@ export default defineComponent({
134134
async signin(): Promise<void> {
135135
await client.startAuthFormInteraction(this.state.featureType, 'iamIdentityCenter')
136136
137-
// Error checks
137+
// Return without actually submitting if the form has errors before submitting
138138
this.updateEmptyFieldErrors()
139139
const fieldsWithError = this.processFieldsWithError()
140-
if (fieldsWithError.length > 0) {
140+
// If there is an error in the submission field from a previous attempt we want to allow them to try submitting again
141+
// without needing to update the form. There are cases where they may not need to update the form (eg: cancelled manually)
142+
// and should be able to submit again
143+
const submitErrorExcluded = fieldsWithError.filter(field => field !== 'submit')
144+
if (submitErrorExcluded.length > 0) {
141145
client.failedAuthAttempt({
142146
authType: 'iamIdentityCenter',
143147
featureType: this.state.featureType,

0 commit comments

Comments
 (0)