jonsaw / amazon-cognito-identity-dart

Unofficial Amazon Cognito Identity Provider Dart SDK, to easily add user sign-up and sign-in to your mobile and web apps with AWS.
MIT License
204 stars 93 forks source link

Has an error "NotAuthorizedException" #23

Closed Den-Ree closed 5 years ago

Den-Ree commented 5 years ago

Hello @jonsaw ! At first, thank for your package.

I'm trying to use it on my project, where I use AWS Cognito. There are 2 apps: iOS native and Flutter. In an iOS app with native SDK everything works, but in the Flutter one, I always have the error: _CognitoClientException{statusCode: 400, code: NotAuthorizedException, name: NotAuthorizedException, message: Unable to verify secret hash for client client_id}_

Credentials are the same on both app (cliendID, pool id and etc).

pmachan commented 5 years ago

Hello @jonsaw I have same problem as @Den-Ree

Den-Ree commented 5 years ago

@pmachan I have fixed it, using instead of iOS client_id, JS client_id.

pmachan commented 5 years ago

@pmachan I have fixed it, using instead of iOS client_id, JS client_id.

@Den-Ree What you mean? I have only App client id in my User pool, which is not specified for a particular platform.

jonsaw commented 5 years ago

Sorry for the late reply. You will have to follow the setup according to this tutorial in Serverless Stack to get it to work properly. I'll try to come up with proper Cognito setup documentation when I have more time.

Den-Ree commented 5 years ago

@jonsaw thanks, I will close it.