Amplify-js: invalid_client error using authorization_grant flow

Created on 19 Nov 2019  路  2Comments  路  Source: aws-amplify/amplify-js

Describe the bug
Using amplify hosted UI I get an 'invalid_client' error from cognito when trying to login using a SAML provider.

To Reproduce
Steps to reproduce the behavior:

  1. Configure a SAML provider for a user pool
  2. Set up amplify for react native
  3. Login using hostedUISignIn()
  4. See error

Expected behavior
Successful login

I get an invalid_client error which suggests, from experience/docs, that the clientId is mismatched with that configured in cognito.

Smartphone (please complete the following information):

  • Device: iPhone 11 Pro
  • OS: iOS 13.2
  • Browser Safari

Additional context
Using token as the response type works, but then i don't get a refresh token.

to-be-reproduced

Most helpful comment

Turns out this was a problem because the user pool pp client had been created (in terraform) using a client secret. Changing this to false fixed the issue. Could this be made clearer in the docs?

All 2 comments

Turns out this was a problem because the user pool pp client had been created (in terraform) using a client secret. Changing this to false fixed the issue. Could this be made clearer in the docs?

Because I looked for it for a while!
In your Cognito User Pool:
User_Pools_-_Amazon_Cognito

Was this page helpful?
0 / 5 - 0 ratings