Error handling auth response. Error: Google+Error+-+401+invalid_client
See original GitHub issueDescribe the bug Using Google Authentication as my social provider in my React Amplify project throws occasionally a Google Error 401 invalid client. What makes this very odd is that I’ve been working on this for about two days and each day for a few hours with no problems at all and then all of a sudden this errors pops up and it stops working. Without me touching anything in the Cognito console.
To me this feels like I’m hitting some kind of request limit in either Cognito or Google? Because setting this up was a breeze with Amplify.
I have both username + password login and Google Authentication setup. The former keep on working fine, but the latter fails.
To Reproduce Steps to reproduce the behavior:
I basically set it up following this article by Nader Dabit: https://dev.to/dabit3/the-complete-guide-to-user-authentication-with-the-amplify-framework-2inh
- Setup Google Auth on your user pool (and configure everything on the Google side)
- Enable the login button for Google auth
- Sign in with my Google account
- Error pops up in the browser console (Error handling auth response. Error: Google+Error±+401+invalid_client)
Expected behavior That this error doesn’t happen even though I haven’t changed anything. User should just login fine.
Code Snippet Let me know what code snippet you need to see to troubleshoot this issue
Screenshots
What is Configured? If applicable, please provide what is configured for Amplify CLI:
- Which steps did you follow via Amplify CLI when configuring your resources. Amplify auth and social provider Google
- Which resources do you have configured? I have two redirectSignIn & redirectSignOut configured and swapping between the two in local vs prod. But problem happens in both.
Environment
System:
OS: macOS 10.15.7
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 191.99 MB / 32.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.13.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.0.3 - /usr/local/bin/npm
Browsers:
Brave Browser: 86.1.15.76
Chrome: 86.0.4240.111
Firefox: 82.0
Safari: 14.0
npmPackages:
@headlessui/react: ^0.2.0 => 0.2.0
@reach/router: ^1.3.4 => 1.3.4
@tailwindcss/typography: ^0.2.0 => 0.2.0
@tailwindcss/ui: ^0.6.2 => 0.6.2
@tailwindui/react: ^0.1.1 => 0.1.1
@testing-library/jest-dom: ^5.11.4 => 5.11.4
@testing-library/react: ^11.1.0 => 11.1.0
@testing-library/user-event: ^12.1.10 => 12.1.10
autoprefixer: ^10.0.1 => 10.0.1
aws-amplify: ^3.3.4 => 3.3.4
aws-amplify-react: ^4.2.8 => 4.2.8
framer-motion: ^2.9.4 => 2.9.4
postcss-cli: ^8.1.0 => 8.1.0
react: ^17.0.1 => 17.0.1
react-dom: ^17.0.1 => 17.0.1
react-ga: ^3.2.0 => 3.2.0
react-scripts: 3.4.4 => 3.4.4
tailwindcss: ^1.9.5 => 1.9.5
npmGlobalPackages:
@aws-amplify/cli: 4.13.1
@tableau/tabextsandbox: 1.0.1
@vue/cli-init: 3.0.0-rc.10
@vue/cli: 3.2.1
autarky: 1.0.5
aws-cdk: 1.54.0
create-next-app: 9.0.3-canary.2
eslint-plugin-react-hooks: 2.1.2
eslint: 4.19.1
forever: 1.0.0
gatsby-cli: 2.12.77
gatsby: 2.14.0
handbrake-js: 3.0.8
hpm-cli: 2.0.1
http-server: 0.10.0
ipify-cli: 1.0.0
jsonexport: 3.0.0
n: 6.1.0
node-gyp: 5.0.7
nodemon: 1.19.3
npm-check-updates: 9.1.2
npm: 7.0.3
package-json-to-readme: 2.1.1
parcel-bundler: 1.12.3
serverless: 1.77.1
tableau-extensions-api-cli: 1.1.4
vercel: 19.2.0
wifi-password-cli: 1.0.0
zapier-platform-cli: 9.0.0```
</details>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top GitHub Comments
hey @chrisbonifacio - can you take a look at reproducing this? It could be a docs issues as well
Hi, @andre347 Did you figure out the issue you faced before? I am facing the exact same error like you