-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(auth): adding support for keychain sharing using app groups #3947
Open
harsh62
wants to merge
7
commits into
main
Choose a base branch
from
harsh62/keychain-sharing-auth-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Remove migrateKeychainItemsOfUserSession bool from SecureStoragePreferences
…check, only delete items if absolutely necessary
9 tasks
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3947 +/- ##
==========================================
- Coverage 67.76% 67.60% -0.17%
==========================================
Files 1125 1118 -7
Lines 52126 51699 -427
==========================================
- Hits 35325 34952 -373
+ Misses 16801 16747 -54
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Failure
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Failure
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Failure
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Failure
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 03:28 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 21:58 — with
GitHub Actions
Inactive
harsh62
temporarily deployed
to
IntegrationTest
January 7, 2025 21:58 — with
GitHub Actions
Inactive
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 21:58 — with
GitHub Actions
Failure
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 21:59 — with
GitHub Actions
Failure
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 21:59 — with
GitHub Actions
Failure
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 21:59 — with
GitHub Actions
Failure
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 22:09 — with
GitHub Actions
Failure
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 22:09 — with
GitHub Actions
Failure
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 22:09 — with
GitHub Actions
Failure
harsh62
had a problem deploying
to
IntegrationTest
January 7, 2025 22:09 — with
GitHub Actions
Failure
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #
#2508
#3277
Integration Tests:
Description
This allows Amplify Swift developers to set the access group they would like the auth session to be shared on. This PR, as opposed to this PR, does not require the other app with which the auth session is being shared with to be reloaded. This helps immensely when writing a product with app extensions.
Changes made
AWSCognitoCredentialAuthCredentialStore
now uses access group to create keychain instance with said access group.If an access group is specified:
fetchAuthSession
reconfigures the plugin when called, so that app reload is not requiredMigration:
migrateKeychainItemsOfUserSession
totrue
within theaccessGroup
structUserDefaults
) to the new access groupUsage
Migrating to a Shared Keychain
To use a shared keychain:
To move to the shared keychain using this new keychain access group, specify the
accessGroup
parameter when instantiating theAWSCognitoAuthPlugin
. If a user is currently signed-in, they will be logged out when first using the access group:If you would prefer the user session to be migrated (which will allow the user to continue to be signed-in), then specify the
migrateKeychainItemsOfUserSession
boolean in theAccessGroup
struct to be true like so:Sign in a user with any sign-in method within one app that uses this access group. After reloading another app that uses this access group, the user will be signed in. Likewise, signing out of one app will sign out the other app after reloading it.
Migrating to another Shared Keychain
To move to a different access group, update the name parameter of the
AccessGroup
to be the new access group. SetmigrateKeychainItemsOfUserSession
totrue
to migrate an existing user session under the previously used access group.Migrating from a Shared Keychain
If you’d like to stop sharing state between this app and other apps, you can set the access group to be
AccessGroup.none
orAccessGroup.none(migrateKeychainItemsOfUserSession: true)
if you’d like the session to be migrated.General Checklist
Given When Then
inline code documentation and are named accordinglytestThing_condition_expectation()
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.