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

Add comments with instructions for when using an app client without a client secret #89

Closed
wants to merge 1 commit into from

Conversation

stefankiesz
Copy link
Contributor

@stefankiesz stefankiesz commented Apr 25, 2024

When using a Cognito app client without a client secret,

  • The AppClientSecret property in awsconfiguration.json must be completely removed. Setting it to blank "" causes an (AWSMobileClient.AWSMobileClientError error 8.) (invalidParameter) error upon signing in on the app.
  • The cognitoIdentityUserPoolAppClientSecret in Constants.swift variable should be left blank.

This is especially helpful considering that the default value for "Client secret" when creating an app client on the AWS console is "Don't generate a client secret".

This is in contrast to the KVS WebRTC Android SDK which can set AppClientSecret to "" in awsconfiguration.json when not using a secret.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

let cognitoIdentityUserPoolId = "REPLACEME"
let cognitoIdentityUserPoolAppClientId = "REPLACEME"
let cognitoIdentityUserPoolAppClientSecret = "REPLACEME"
let cognitoIdentityUserPoolAppClientSecret = "REPLACEME" // <- Leave blank "" if AppClient does not use a client secret.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you would also need to set this to nil instead?

clientSecret: cognitoIdentityUserPoolAppClientSecret,

It makes logical sense considering the "credentialsProvider" argument in the previous line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants