Skip to content
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

Swift: Add Sign In With Apple example #6927

Merged
merged 3 commits into from
Sep 26, 2024
Merged

Conversation

shepazon
Copy link
Contributor

This PR adds an example SwiftUI application demonstrating how to use Sign In With Apple to authenticate with AWS using an account number and IAM role. Once authenticated, the user's S3 buckets are presented in a list. Account and user information is stored in the Keychain using Auth0's SimpleKeychain package.

To run this application, you need to configure the app with the ID "com.example.buckets" on an Apple Developer account, and you need to choose or create an IAM role to use when running the example.

This example will be embedded in part into a section in the AWS SDK for Swift Developer Guide that covers the topic of using Sign In With Apple for AWS authentication. That content is in the process of being written now.

This application is compatible with macOS, iOS, and iPadOS.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@shepazon shepazon self-assigned this Sep 25, 2024
@shepazon shepazon added the Swift This issue relates to the AWS SDK for Swift label Sep 25, 2024
@meyertst-aws meyertst-aws added the Task A general update to the code base for language clarification, missing actions, tests, etc. label Sep 25, 2024
@shepazon
Copy link
Contributor Author

This should now be good to merge.

@shepazon shepazon added the On Call Review needed This work needs an on-call review label Sep 25, 2024
@Laren-AWS Laren-AWS added On Call Review complete On call review complete and removed On Call Review needed This work needs an on-call review labels Sep 26, 2024
This adds a new example that uses Sign In With Apple to authenticate
to AWS, then display a list of the Amazon S3 buckets the user has
available. The user interface is presented using SwiftUI, and the
application works on macOS, iOS, and iPadOS.
This update switches from using the unencrypted SwiftUI
`@AppStorage` to using Auth0's `SimpleKeychain` library to
save the user account information locally.
Did a few cleanup tasks to prepare for posting:

* Added missing copyright headers and removed crufty default ones.
* Removed the extension on `Task` that's no longer being used.
* Added a frame constraint to the `SignInWithAppleButton` to stop
  getting runtime warnings logged by UIKit on newer iOS versions.
@Laren-AWS Laren-AWS merged commit a096eb8 into awsdocs:main Sep 26, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On Call Review complete On call review complete Swift This issue relates to the AWS SDK for Swift Task A general update to the code base for language clarification, missing actions, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants