From 7ffdf21c62b0ef155ca8e7dd2923034ff3161d84 Mon Sep 17 00:00:00 2001 From: Sebastian Villena <97059974+ruisebas@users.noreply.github.com> Date: Tue, 7 May 2024 10:05:42 -0400 Subject: [PATCH] fix: Sign in fails when user is auto confirmed after sign up (#72) --- .github/workflows/unit_tests.yml | 8 ++------ Sources/Authenticator/States/SignUpState.swift | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 626453b..e3e8a5d 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -8,9 +8,7 @@ on: jobs: unit-test-ios: - runs-on: macos-latest - steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Unit test Authenticator on iOS @@ -24,15 +22,13 @@ jobs: cd ${{ github.workspace }} xcrun llvm-cov export -format="lcov" -instr-profile $pathCoverage Build/Build/Products/Debug-iphonesimulator/Authenticator.o > Authenticator-Coverage.lcov - name: Upload Report - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 + uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0 with: flags: Authenticator - verbose: true + token: ${{ secrets.CODECOV_TOKEN }} unit-test-macos: - runs-on: macos-latest - steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Unit test Authenticator on macOS diff --git a/Sources/Authenticator/States/SignUpState.swift b/Sources/Authenticator/States/SignUpState.swift index 696ce28..0dd364f 100644 --- a/Sources/Authenticator/States/SignUpState.swift +++ b/Sources/Authenticator/States/SignUpState.swift @@ -51,10 +51,10 @@ public class SignUpState: AuthenticatorBaseState { password: password, options: .init(userAttributes: attributes) ) - let nextStep = try await nextStep(for: result) - setBusy(false) credentials.username = username credentials.password = password + let nextStep = try await nextStep(for: result) + setBusy(false) authenticatorState.setCurrentStep(nextStep) } catch { log.error("Unable to Sign Up")