awslabs / aws-sdk-swift

Apache License 2.0
358 stars 71 forks source link

Cognito Unauthenticated Access #739

Open duncangroenewald opened 1 year ago

duncangroenewald commented 1 year ago

Describe the bug

Can someone provide and example of how to use Cognito to provide an application with unauthenticated access.

Client application needs to be able to access certain AWS services by default.

The API examples appear to be focussed on API calls to create identity pools rather than actual application authentication.

Expected Behavior

There does not appear to be the equivalent

// Initialize the Amazon Cognito credentials provider CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider( getApplicationContext(), "ap-southeast-2:xxxxxxx", // Identity pool ID Regions.AP_SOUTHEAST_2 // Region );

or ability to set the defaultServiceConfiguration

AWSServiceManager.default().defaultServiceConfiguration = USEast1ServiceConfiguration

Current Behavior

Unclear how to authenticate with Cognito using Swift SDK

Reproduction Steps

Unclear how to authenticate with Cognito using Swift SDK

Possible Solution

No response

Additional Information/Context

No response

AWS SWIFT SDK version used

0.5.0

Compiler and Version used

Xcode 14.1

Operating System and version

macOS 13.0.1

ganeshnj commented 1 year ago

@shepazon this is something we should document in the tutorials.

naingminoo99 commented 1 year ago

can we have any update on this. still cannot find a proper example or doc regarding credential configuration for this sdk.