Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
238850c
fix(auth): throw the identity pool's error from confirmSignIn instead…
harsh62 Oct 23, 2026
fc951e1
fix(auth): redact the challenge session in every printed form of a si…
harsh62 Oct 23, 2026
d469846
fix(auth): save the signed-out record when the plugin ends a session …
harsh62 Oct 23, 2026
d5afa46
docs(auth): describe the credential store's log category without the …
harsh62 Oct 23, 2026
deb8ea3
docs(auth): say the plugin's sign-out saves the signed-out record und…
harsh62 Oct 28, 2026
5e2530b
test(auth): pin the plugin's signed-out record against the AWSMobileC…
harsh62 Oct 28, 2026
23847d9
fix(auth): save the signed-out record under an access group only when…
harsh62 Oct 28, 2026
dcfbc56
test(auth): pin the redacted challenge in the error of an MFA setup t…
harsh62 Oct 28, 2026
5a358da
docs(auth): release notes, design and decisions for the confirmSignIn…
harsh62 Oct 28, 2026
54a11d3
test(auth): move the access-group record's migration and rollback tes…
harsh62 Oct 28, 2026
c4f40b1
docs(auth): say which verbose lines the access-group sign-out's read …
harsh62 Oct 28, 2026
13798c0
docs(auth): say that the guest fetch after a sign-out clears AWSMobil…
harsh62 Oct 29, 2026
9fa5191
docs(auth): say that a guest over an identity-pool-only sign-out leav…
harsh62 Oct 29, 2026
0a9b684
docs(auth): say the signed-out record stops the AWSMobileClient migra…
harsh62 Oct 29, 2026
308d68b
docs(auth): describe when confirmSignIn refuses an answer to a reset-…
harsh62 Oct 29, 2026
25ec941
docs(auth): say browserBusy can name the session itself when no sessi…
harsh62 Oct 29, 2026
846d435
docs(auth): say only a partial sign-out's service error says it won't…
harsh62 Oct 29, 2026
0d56e90
test(auth): pin that a guest over the default session's signed-out re…
harsh62 Oct 29, 2026
c1109be
test(auth): pin that a double tap says it is queued only when the ses…
harsh62 Oct 29, 2026
bacc64a
fix(auth): say the sheet is still closing to a double tap queued behi…
harsh62 Oct 29, 2026
0ab481d
docs(auth): say which refused TOTP code lets confirmSignIn send a res…
harsh62 Oct 29, 2026
3d4239a
fix(auth): keep the user's confirmSignIn answer out of the sign-in's …
harsh62 Oct 29, 2026
8d17aae
fix(auth): redact the TOTP setup's verified session in the event Veri…
harsh62 Oct 29, 2026
6aa3021
fix(auth): print AuthSignUpStep with the auto sign-in session redacted
harsh62 Oct 29, 2026
e70fb2e
fix(auth): sign out when confirmSignIn throws the identity pool's err…
harsh62 Oct 29, 2026
3528c7b
fix(auth): replace an access-group login with the signed-out record i…
harsh62 Oct 29, 2026
072d0cb
fix(auth): suggest waiting for the queued call when a session's own s…
harsh62 Oct 29, 2026
62d3c4b
docs(auth): release notes and decisions for the secret redactions, th…
harsh62 Oct 29, 2026
5b16e8b
test(auth): pin the resumed access-group migration's configuration re…
harsh62 Oct 29, 2026
8ae7f6d
ci(auth): refuse a first sandbox provision unless the profile holds i…
harsh62 Oct 29, 2026
c81d08d
ci: fail closed on a rename from an unknown path unless the new path …
harsh62 Oct 29, 2026
1841b53
ci: pin the selector's default repo root and a bundled README renamed…
harsh62 Oct 29, 2026
fff2f5f
ci: check for missing bundled files in detect instead of selecting a …
harsh62 Oct 29, 2026
7674333
ci: run the test selector's self-test in its own workflow
harsh62 Oct 29, 2026
9560239
fix(auth): keep a session's dead-token expiry when its session core i…
harsh62 Oct 29, 2026
5745c4d
ci(auth): extend the code sink's API key from a weekly ccit-ci- Lambda
harsh62 Oct 29, 2026
abddf61
ci(auth): extend an expired code sink key in place before making a ne…
harsh62 Oct 29, 2026
cd83dd9
ci(auth): refuse a phase-1 --apply while phase-2 ccit-ci- resources e…
harsh62 Oct 29, 2026
b60429d
ci(auth): add a guarded provision-ci.sh replace <pool> command
harsh62 Oct 29, 2026
cdfbb31
test(auth): check the SNS caller role's trust in the fake AWS, withou…
harsh62 Oct 29, 2026
5d303dd
test(auth): check that replace refuses an untagged uploaded file of t…
harsh62 Oct 29, 2026
902222b
test(auth): pin that confirmSignIn returns when the sign-out cancelli…
harsh62 Oct 29, 2026
084551c
docs(auth): say in the client README that a session's dead-token expi…
harsh62 Oct 29, 2026
9d7abf3
docs(auth): describe the weekly key extension and the first-run crede…
harsh62 Oct 29, 2026
8b3c0ca
docs(auth): document the saved dead-token expiry in the client design
harsh62 Oct 29, 2026
3ec28ac
docs(auth): record that a dead-token expiry is saved with the session…
harsh62 Oct 29, 2026
640d5f0
docs(auth): release notes for the saved dead-token expiry
harsh62 Oct 29, 2026
70f57e4
ci(auth): log a fixed text when AppSync refuses to extend a live code…
harsh62 Oct 29, 2026
ca4e9d9
docs(auth): say that replace only warns when gh cannot tell whether a…
harsh62 Oct 29, 2026
636a44c
ci: pin that the bundled-file check escapes a missing file's name in …
harsh62 Oct 29, 2026
94844b0
fix(auth): revoke a cancelled sign-in's own tokens, not the login the…
harsh62 Oct 29, 2026
5421190
docs(auth): release notes for the revoke of a cancelled sign-in's own…
harsh62 Oct 29, 2026
5ae1217
docs(auth): say the plugin's confirmSignIn hung on a failed identity …
harsh62 Oct 29, 2026
9e3a60b
docs(auth): say a plugin sign-out under an access group leaves a sign…
harsh62 Oct 29, 2026
7145493
docs(auth): tell apps with their own AuthSignUpStep description confo…
harsh62 Oct 29, 2026
9e4cc8d
ci(auth): record the CI Lambdas' deployed files as the drift baseline
harsh62 Oct 29, 2026
1d0b39a
fix(auth): stop repeating the parsed value in the MFA-type and auth-f…
harsh62 Oct 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/build_amplify_swift_platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,19 @@ jobs:
echo "build=true" >> "$GITHUB_OUTPUT"
exit 0
fi
# A file an Xcode project copies into a bundle (a host app's README, say) that is missing from the
# checkout breaks the copying target's build, which a skipped job can't show: fail here, naming the project.
python3 scripts/python/affected_targets.py --check-bundled
base="$BASE_REF"
git fetch --no-tags origin "$base" || true
# With rename detection a rename lists only its new path; its old path goes to --renamed-from, which
# the selector attributes (a bundled file's old path still selects its group) but never fails closed on.
# With rename detection a rename lists only its new path. --renames gets each rename's old and new paths;
# the selector attributes the old path too, and fails closed on an unknown one unless the new one is attributed.
mb="$(git merge-base HEAD "origin/$base")"
git diff --name-only -M "$mb" HEAD > /tmp/changed.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2 > /tmp/renamed_from.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2- > /tmp/renames.txt
swift package dump-package > /tmp/package.json
sel=$(python3 scripts/python/affected_targets.py \
--package /tmp/package.json --changed /tmp/changed.txt --renamed-from /tmp/renamed_from.txt \
--package /tmp/package.json --changed /tmp/changed.txt --renames /tmp/renames.txt \
--groups scripts/python/unit_test_groups.json | grep '^selected=' | cut -d= -f2-)
[ "$sel" = "[]" ] && echo "build=false" >> "$GITHUB_OUTPUT" || echo "build=true" >> "$GITHUB_OUTPUT"

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build_minimum_supported_swift_platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,19 @@ jobs:
echo "build=true" >> "$GITHUB_OUTPUT"
exit 0
fi
# A file an Xcode project copies into a bundle (a host app's README, say) that is missing from the
# checkout breaks the copying target's build, which a skipped job can't show: fail here, naming the project.
python3 scripts/python/affected_targets.py --check-bundled
base="$BASE_REF"
git fetch --no-tags origin "$base" || true
# With rename detection a rename lists only its new path; its old path goes to --renamed-from, which
# the selector attributes (a bundled file's old path still selects its group) but never fails closed on.
# With rename detection a rename lists only its new path. --renames gets each rename's old and new paths;
# the selector attributes the old path too, and fails closed on an unknown one unless the new one is attributed.
mb="$(git merge-base HEAD "origin/$base")"
git diff --name-only -M "$mb" HEAD > /tmp/changed.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2 > /tmp/renamed_from.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2- > /tmp/renames.txt
swift package dump-package > /tmp/package.json
sel=$(python3 scripts/python/affected_targets.py \
--package /tmp/package.json --changed /tmp/changed.txt --renamed-from /tmp/renamed_from.txt \
--package /tmp/package.json --changed /tmp/changed.txt --renames /tmp/renames.txt \
--groups scripts/python/unit_test_groups.json | grep '^selected=' | cut -d= -f2-)
[ "$sel" = "[]" ] && echo "build=false" >> "$GITHUB_OUTPUT" || echo "build=true" >> "$GITHUB_OUTPUT"

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build_xcode_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,19 @@ jobs:
echo "build=true" >> "$GITHUB_OUTPUT"
exit 0
fi
# A file an Xcode project copies into a bundle (a host app's README, say) that is missing from the
# checkout breaks the copying target's build, which a skipped job can't show: fail here, naming the project.
python3 scripts/python/affected_targets.py --check-bundled
base="$BASE_REF"
git fetch --no-tags origin "$base" || true
# With rename detection a rename lists only its new path; its old path goes to --renamed-from, which
# the selector attributes (a bundled file's old path still selects its group) but never fails closed on.
# With rename detection a rename lists only its new path. --renames gets each rename's old and new paths;
# the selector attributes the old path too, and fails closed on an unknown one unless the new one is attributed.
mb="$(git merge-base HEAD "origin/$base")"
git diff --name-only -M "$mb" HEAD > /tmp/changed.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2 > /tmp/renamed_from.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2- > /tmp/renames.txt
swift package dump-package > /tmp/package.json
sel=$(python3 scripts/python/affected_targets.py \
--package /tmp/package.json --changed /tmp/changed.txt --renamed-from /tmp/renamed_from.txt \
--package /tmp/package.json --changed /tmp/changed.txt --renames /tmp/renames.txt \
--groups scripts/python/unit_test_groups.json | grep '^selected=' | cut -d= -f2-)
[ "$sel" = "[]" ] && echo "build=false" >> "$GITHUB_OUTPUT" || echo "build=true" >> "$GITHUB_OUTPUT"

Expand Down
24 changes: 3 additions & 21 deletions .github/workflows/ci_script_self_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# integration-test jobs run it, with BSD find.
# - scripts/cognito-engine/check_fixture_lock.sh: the plugin behavior snapshot lock's self-file check
# (test_check_fixture_lock.sh, in a scratch repository built from this checkout).
# - scripts/python/affected_targets.py: the test selector the unit and integration workflows run, over the real
# group files, this checkout's Xcode projects (the READMEs host apps bundle) and a stub package dump
# (test_affected_targets.py), so it needs no Swift toolchain. A project change runs it too.
#
# The test selector's self-test is in ci_selector_self_tests.yml, so that a project change, which it reads, starts
# only that one.
#
# No AWS call is made, and the jobs need no credentials and no secrets.

Expand All @@ -20,9 +20,6 @@ on:
- 'scripts/cognito-engine/check_fixture_lock.sh'
- 'scripts/cognito-engine/test_check_fixture_lock.sh'
- '.github/workflows/auth_golden_fixture_lock.yml'
- 'scripts/python/**'
# The selector's self-test reads the host apps' Copy Bundle Resources from the real Xcode projects.
- '**/*.xcodeproj/project.pbxproj'
- '.github/workflows/ci_script_self_tests.yml'
push:
branches:
Expand All @@ -32,9 +29,6 @@ on:
- 'scripts/cognito-engine/check_fixture_lock.sh'
- 'scripts/cognito-engine/test_check_fixture_lock.sh'
- '.github/workflows/auth_golden_fixture_lock.yml'
- 'scripts/python/**'
# The selector's self-test reads the host apps' Copy Bundle Resources from the real Xcode projects.
- '**/*.xcodeproj/project.pbxproj'
- '.github/workflows/ci_script_self_tests.yml'

permissions:
Expand Down Expand Up @@ -64,15 +58,3 @@ jobs:

- name: Run the self-test
run: bash scripts/cognito-engine/test_check_fixture_lock.sh

test-selector:
name: Test selector
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
persist-credentials: false

- name: Run the self-test
run: python3 -m unittest discover -s scripts/python -p 'test_*.py'
39 changes: 39 additions & 0 deletions .github/workflows/ci_selector_self_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Offline self-test of scripts/python/affected_targets.py, the test selector and bundled-file check the unit,
# integration and build workflows' detect steps run (test_affected_targets.py). It runs over the real group files, a
# stub package dump and this checkout's Xcode projects (the files host apps copy into bundles), so it needs no Swift
# toolchain. A project change runs it too, since the check reads the projects; the other script self-tests are in
# ci_script_self_tests.yml, which a project change doesn't start.
#
# No AWS call is made, and the job needs no credentials and no secrets.

name: CI | Test Selector Self-Tests

on:
pull_request:
paths:
- 'scripts/python/**'
- '**/*.xcodeproj/project.pbxproj'
- '.github/workflows/ci_selector_self_tests.yml'
push:
branches:
- main
paths:
- 'scripts/python/**'
- '**/*.xcodeproj/project.pbxproj'
- '.github/workflows/ci_selector_self_tests.yml'

permissions:
contents: read

jobs:
test-selector:
name: Test selector
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
persist-credentials: false

- name: Run the self-test
run: python3 -m unittest discover -s scripts/python -p 'test_*.py'
11 changes: 7 additions & 4 deletions .github/workflows/integ_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,19 @@ jobs:
done
exit 0
fi
# A file an Xcode project copies into a bundle (a host app's README, say) that is missing from the
# checkout breaks the copying target's build, which a skipped job can't show: fail here, naming the project.
python3 scripts/python/affected_targets.py --check-bundled
base="$BASE_REF"
git fetch --no-tags origin "$base" || true
# With rename detection a rename lists only its new path; its old path goes to --renamed-from, which
# the selector attributes (a bundled file's old path still selects its group) but never fails closed on.
# With rename detection a rename lists only its new path. --renames gets each rename's old and new paths;
# the selector attributes the old path too, and fails closed on an unknown one unless the new one is attributed.
mb="$(git merge-base HEAD "origin/$base")"
git diff --name-only -M "$mb" HEAD > /tmp/changed.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2 > /tmp/renamed_from.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2- > /tmp/renames.txt
swift package dump-package > /tmp/package.json
python3 scripts/python/affected_targets.py \
--package /tmp/package.json --changed /tmp/changed.txt --renamed-from /tmp/renamed_from.txt \
--package /tmp/package.json --changed /tmp/changed.txt --renames /tmp/renames.txt \
--groups scripts/python/integ_test_groups.json | tee -a "$GITHUB_OUTPUT"

analytics-test:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/integ_test_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,19 @@ jobs:
echo "api=true" >> "$GITHUB_OUTPUT"
exit 0
fi
# A file an Xcode project copies into a bundle (a host app's README, say) that is missing from the
# checkout breaks the copying target's build, which a skipped job can't show: fail here, naming the project.
python3 scripts/python/affected_targets.py --check-bundled
base="$BASE_REF"
git fetch --no-tags origin "$base" || true
# With rename detection a rename lists only its new path; its old path goes to --renamed-from, which
# the selector attributes (a bundled file's old path still selects its group) but never fails closed on.
# With rename detection a rename lists only its new path. --renames gets each rename's old and new paths;
# the selector attributes the old path too, and fails closed on an unknown one unless the new one is attributed.
mb="$(git merge-base HEAD "origin/$base")"
git diff --name-only -M "$mb" HEAD > /tmp/changed.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2 > /tmp/renamed_from.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2- > /tmp/renames.txt
swift package dump-package > /tmp/package.json
python3 scripts/python/affected_targets.py \
--package /tmp/package.json --changed /tmp/changed.txt --renamed-from /tmp/renamed_from.txt \
--package /tmp/package.json --changed /tmp/changed.txt --renames /tmp/renames.txt \
--groups scripts/python/integ_test_groups.json | tee -a "$GITHUB_OUTPUT"

functional-test:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/integ_test_datastore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,19 @@ jobs:
echo "datastore=true" >> "$GITHUB_OUTPUT"
exit 0
fi
# A file an Xcode project copies into a bundle (a host app's README, say) that is missing from the
# checkout breaks the copying target's build, which a skipped job can't show: fail here, naming the project.
python3 scripts/python/affected_targets.py --check-bundled
base="$BASE_REF"
git fetch --no-tags origin "$base" || true
# With rename detection a rename lists only its new path; its old path goes to --renamed-from, which
# the selector attributes (a bundled file's old path still selects its group) but never fails closed on.
# With rename detection a rename lists only its new path. --renames gets each rename's old and new paths;
# the selector attributes the old path too, and fails closed on an unknown one unless the new one is attributed.
mb="$(git merge-base HEAD "origin/$base")"
git diff --name-only -M "$mb" HEAD > /tmp/changed.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2 > /tmp/renamed_from.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2- > /tmp/renames.txt
swift package dump-package > /tmp/package.json
python3 scripts/python/affected_targets.py \
--package /tmp/package.json --changed /tmp/changed.txt --renamed-from /tmp/renamed_from.txt \
--package /tmp/package.json --changed /tmp/changed.txt --renames /tmp/renames.txt \
--groups scripts/python/integ_test_groups.json | tee -a "$GITHUB_OUTPUT"

datastore-base-test:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,19 @@ jobs:
if [ -n "$IDENTIFIER" ] || [ "$EVENT_NAME" != "push" ] || [ "$GITHUB_REF_NAME" = "main" ]; then
sel=$(jq -c 'keys' scripts/python/unit_test_groups.json)
else
# A file an Xcode project copies into a bundle (a host app's README, say) that is missing from the
# checkout breaks the copying target's build, which a skipped job can't show: fail here, naming the project.
python3 scripts/python/affected_targets.py --check-bundled
base="$BASE_REF"
git fetch --no-tags origin "$base" || true
# With rename detection a rename lists only its new path; its old path goes to --renamed-from, which
# the selector attributes (a bundled file's old path still selects its group) but never fails closed on.
# With rename detection a rename lists only its new path. --renames gets each rename's old and new paths;
# the selector attributes the old path too, and fails closed on an unknown one unless the new one is attributed.
mb="$(git merge-base HEAD "origin/$base")"
git diff --name-only -M "$mb" HEAD > /tmp/changed.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2 > /tmp/renamed_from.txt
git diff --name-status -M --diff-filter=R "$mb" HEAD | cut -f2- > /tmp/renames.txt
swift package dump-package > /tmp/package.json
sel=$(python3 scripts/python/affected_targets.py \
--package /tmp/package.json --changed /tmp/changed.txt --renamed-from /tmp/renamed_from.txt \
--package /tmp/package.json --changed /tmp/changed.txt --renames /tmp/renames.txt \
--groups scripts/python/unit_test_groups.json | grep '^selected=' | cut -d= -f2-)
fi
echo "selected: $sel"
Expand Down
36 changes: 36 additions & 0 deletions Amplify/Categories/Auth/Models/AuthSignUpStep.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,39 @@ public enum AuthSignUpStep {
}

extension AuthSignUpStep: Sendable { }

extension AuthSignUpStep: CustomStringConvertible, CustomDebugStringConvertible, CustomReflectable {
Comment thread
thisisabhash marked this conversation as resolved.
Resolved

/// The default enum printing, with the auto sign-in session redacted: the step is logged as part of a sign-up
/// result, and the session, with the username, signs the user in. Match `.completeAutoSignIn(let session)` for the
/// value.
public var description: String {
switch self {
case .confirmUser(let details, let additionalInfo, let userId):
return "confirmUser(\(String(reflecting: details)), \(String(reflecting: additionalInfo)), "
+ "\(String(reflecting: userId)))"
case .completeAutoSignIn:
return "completeAutoSignIn(\(String(reflecting: Self.redactedSession)))"
case .done:
return "done"
}
}

public var debugDescription: String {
"\(String(reflecting: Self.self)).\(description)"
}

/// For `dump` and debuggers: the auto sign-in session redacted.
public var customMirror: Mirror {
switch self {
case .confirmUser(let details, let additionalInfo, let userId):
return Mirror(self, children: ["confirmUser": (details, additionalInfo, userId)], displayStyle: .enum)
case .completeAutoSignIn:
return Mirror(self, children: ["completeAutoSignIn": Self.redactedSession], displayStyle: .enum)
case .done:
return Mirror(self, children: [:], displayStyle: .enum)
}
}

private static let redactedSession = "<REDACTED>"
}
Loading
Loading